Skip to content

Commit

Permalink
auto merge of #7100 : thestinger/rust/hashmap, r=pnkfelix
Browse files Browse the repository at this point in the history
Not much point in leaving these around. They just get in the way when you actually want to log something else.
  • Loading branch information
bors committed Jun 13, 2013
2 parents 4e950e9 + ed7892a commit a198aad
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/libstd/hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ impl<K:Hash + Eq,V> HashMap<K, V> {

#[inline(always)]
fn next_bucket(&self, idx: uint, len_buckets: uint) -> uint {
let n = (idx + 1) % len_buckets;
debug!("next_bucket(%?, %?) = %?", idx, len_buckets, n);
n
(idx + 1) % len_buckets
}

#[inline(always)]
Expand Down Expand Up @@ -215,16 +213,12 @@ impl<K:Hash + Eq,V> HashMap<K, V> {
match self.bucket_for_key_with_hash(hash, &k) {
TableFull => { fail!("Internal logic error"); }
FoundHole(idx) => {
debug!("insert fresh (%?->%?) at idx %?, hash %?",
k, v, idx, hash);
self.buckets[idx] = Some(Bucket{hash: hash, key: k,
value: v});
self.size += 1;
None
}
FoundEntry(idx) => {
debug!("insert overwrite (%?->%?) at idx %?, hash %?",
k, v, idx, hash);
match self.buckets[idx] {
None => { fail!("insert_internal: Internal logic error") }
Some(ref mut b) => {
Expand Down

0 comments on commit a198aad

Please sign in to comment.