Created
February 8, 2023 16:00
-
-
Save DarkFenX/9b8b943f0a37b642a29ca413c8a6f400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct Parent<'a> { | |
source: Option<Src>, | |
children: ic::Unordered<'a, Child>, | |
} | |
impl Parent { | |
pub fn new(src: Option<Src>) -> Parent { | |
Parent { src, children: ic::Unordered::new(???) } | |
} | |
pub struct Unordered<'f, T> | |
where | |
T: Hash + Eq, | |
{ | |
parent: &'f Parent, | |
data: HashSet<T>, | |
} | |
impl<'f, T> Unordered<'f, T> | |
where | |
T: Hash + Eq, | |
{ | |
pub(crate) fn new(parent: &'f Parent) -> Unordered<'f, T> { | |
Unordered { | |
parent, | |
data: HashSet::new(), | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment