Macro rb_tree::new_set [−][src]
macro_rules! new_set { ( $($v:expr),* ) => { ... }; }
Expand description
Returns an RBTree containing the items given separated by commas.
Example:
use rb_tree::{RBTree, new_set}; let t1 = new_set!('b', 'a', 'd', 'c'); let t2 = new_set!('d', 'f', 'e', 'c'); let mut in_both = t1.intersection(&t2); assert_eq!(in_both.next().unwrap(), &'c'); assert_eq!(in_both.next().unwrap(), &'d'); assert_eq!(in_both.next(), None);