Skip to content

Commit

Permalink
Clean up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Nov 1, 2014
1 parent cad7080 commit b44065b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion phf/src/lib.rs
Expand Up @@ -3,7 +3,7 @@
//! Keys can be string literals, byte string literals, byte literals, char
//! literals, or any of the fixed-size integral types.
#![doc(html_root_url="https://sfackler.github.io/doc")]
#![warn(missing_doc)]
#![warn(missing_docs)]
#![feature(macro_rules, tuple_indexing, phase, globs)]
#![no_std]

Expand Down
4 changes: 2 additions & 2 deletions phf_mac/src/util.rs
Expand Up @@ -135,7 +135,7 @@ pub fn try_generate_hash(entries: &[Entry], rng: &mut XorShiftRng) -> Option<Has
let mut buckets = Vec::from_fn(buckets_len, |i| Bucket { idx: i, keys: vec![] });

for (i, hash) in hashes.iter().enumerate() {
buckets.get_mut((hash.g % (buckets_len as u32)) as uint).keys.push(i);
buckets[(hash.g % (buckets_len as u32)) as uint].keys.push(i);
}

// Sort descending
Expand Down Expand Up @@ -172,7 +172,7 @@ pub fn try_generate_hash(entries: &[Entry], rng: &mut XorShiftRng) -> Option<Has
if map[idx].is_some() || try_map[idx] == generation {
continue 'disps;
}
*try_map.get_mut(idx) = generation;
try_map[idx] = generation;
values_to_add.push((idx, key));
}

Expand Down

0 comments on commit b44065b

Please sign in to comment.