use fqdn::FQDN; use fqdn_trie::*; fn main() { let www = [ "www.orange.com", "mail.orange.com", "orange.com", "a.orange.com", "a.mail.orange.com", ]; let mut trie = www.iter() .map(|s| s.parse::()) .collect::,_>>() .unwrap(); trie.open_dot_view().expect("can’t open dot view"); www.iter() .step_by(2) .map(|s| s.parse::().unwrap()) .for_each(|s| {trie.remove(&s);}); trie.open_dot_view().expect("can’t open dot view"); }