Skip to content

Instantly share code, notes, and snippets.

@DarkFenX
Created February 8, 2023 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DarkFenX/9b8b943f0a37b642a29ca413c8a6f400 to your computer and use it in GitHub Desktop.
Save DarkFenX/9b8b943f0a37b642a29ca413c8a6f400 to your computer and use it in GitHub Desktop.
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