]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #6292 : thestinger/rust/cleanup, r=brson
authorbors <bors@rust-lang.org>
Tue, 7 May 2013 19:42:41 +0000 (12:42 -0700)
committerbors <bors@rust-lang.org>
Tue, 7 May 2013 19:42:41 +0000 (12:42 -0700)
1  2 
src/libcore/hashmap.rs
src/libcore/trie.rs

index 33fdc98137e8dde0751c8d0b586714166b8c4a97,4ec2e911bf86269d26f46ca3f52a192b56bff414..b764fccf64cff0ec65c2cdd487cdaa509543c0ea
@@@ -422,8 -413,34 +433,9 @@@ pub impl<K: Hash + Eq, V> HashMap<K, V
          }
      }
  
 -    fn pop(&mut self, k: &K) -> Option<V> {
 -        let hash = k.hash_keyed(self.k0, self.k1) as uint;
 -        self.pop_internal(hash, k)
 -    }
 -
 -    fn swap(&mut self, k: K, v: V) -> Option<V> {
 -        // this could be faster.
 -        let hash = k.hash_keyed(self.k0, self.k1) as uint;
 -        let old_value = self.pop_internal(hash, &k);
 -
 -        if self.size >= self.resize_at {
 -            // n.b.: We could also do this after searching, so
 -            // that we do not resize if this call to insert is
 -            // simply going to update a key in place.  My sense
 -            // though is that it's worse to have to search through
 -            // buckets to find the right spot twice than to just
 -            // resize in this corner case.
 -            self.expand();
 -        }
 -
 -        self.insert_internal(hash, k, v);
 -
 -        old_value
 -    }
 -
      /// Return the value corresponding to the key in the map, or insert
      /// and return the value if it doesn't exist.
+     #[cfg(stage0)]
      fn find_or_insert<'a>(&'a mut self, k: K, v: V) -> &'a V {
          if self.size >= self.resize_at {
              // n.b.: We could also do this after searching, so
Simple merge