-
-
Save rust-play/e9a2a667c7f9015fdf681a7e6a542d63 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
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
use std::collections::BTreeSet; | |
#[derive(Hash)] | |
pub enum ElemDerived { | |
A(ElemDerived) | |
} | |
pub enum Elem { | |
Derived(ElemDerived) | |
} | |
pub struct Set(BTreeSet<Elem>); | |
impl Set { | |
pub fn into_iter(self) -> impl Iterator<Item = Elem> { | |
self.0.into_iter() | |
} | |
} | |
fn main() {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment