micromap_rawl/set/ctors.rs
1use crate::{Map, Set};
2
3impl<T: PartialEq, const N: usize> Default for Set<T, N> {
4 /// Make a default empty [`Set`].
5 #[inline]
6 #[must_use]
7 fn default() -> Self {
8 Self::new()
9 }
10}
11
12impl<T: PartialEq, const N: usize> Set<T, N> {
13 /// Make it.
14 ///
15 /// The size of the set is defined by the generic argument. For example,
16 /// this is how you make a set of four key-values pairs:
17 #[inline]
18 #[must_use]
19 #[allow(clippy::uninit_assumed_init)]
20 pub const fn new() -> Self {
21 Self {
22 map: Map::<T, (), N>::new(),
23 }
24 }
25}