1 2 3 4 5 6 7 8 9 10 11 12
use tries::Trie; #[test] fn test_trie() { let mut trie = Trie::new(); trie.insert("happy"); trie.insert("happily"); assert!(trie.search("happy")); assert!(trie.search("happily")); assert!(!trie.search("hello")); }