We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6859a6d commit 98900d5Copy full SHA for 98900d5
src/libcore/trie.rs
@@ -137,6 +137,7 @@ impl<T> Map<uint, T> for TrieMap<T> {
137
}
138
139
impl<T> TrieMap<T> {
140
+ /// Create an empty TrieMap
141
#[inline(always)]
142
static pure fn new() -> TrieMap<T> {
143
TrieMap{root: TrieNode::new(), length: 0}
@@ -191,6 +192,12 @@ impl Mutable for TrieSet {
191
192
193
194
impl TrieSet {
195
+ /// Create an empty TrieSet
196
+ #[inline(always)]
197
+ static pure fn new() -> TrieSet {
198
+ TrieSet{map: TrieMap::new()}
199
+ }
200
+
201
/// Return true if the set contains a value
202
203
pure fn contains(&self, value: &uint) -> bool {
0 commit comments