Skip to content

Commit 700f05c

Browse files
committedJan 25, 2017
Updates code due to range API change
For more info see rust-lang/rust#38610 rust-lang/rust#27787
1 parent 5fde448 commit 700f05c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/memory.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ impl<'a> Dictionary<'a> {
354354
// Finding best entry to merge-in the new value
355355
// TODO Optimize the case when at least threshold bits_set
356356
if let Some((key, value, _)) = self.map
357-
.range_mut(Excluded(&lower_bound), Included(&pending_key))
357+
.range_mut((Excluded(&lower_bound), Included(&pending_key)))
358358
.map(|(k, v)| (k, v, k.0.fuzzy_eq(&pending_key.0)))
359359
.filter(|&(_, _, m)| m >= bit_threshold)
360360
.max_by(|x, y| x.2.cmp(&y.2)) // max by matched_bits
@@ -409,7 +409,7 @@ impl<'a> Dictionary<'a> {
409409
let bit_threshold = (key.0.bits_set as f32 / 100. * similarity as f32).round() as usize;
410410

411411
if let Some((_, value, _)) = self.map
412-
.range(Excluded(&lower_bound), Included(&key))
412+
.range((Excluded(&lower_bound), Included(key)))
413413
.map(|(k, v)| (k, v, k.0.fuzzy_eq(&key.0)))
414414
.filter(|&(_, _, m)| m >= bit_threshold)
415415
.max_by(|x, y| x.2.cmp(&y.2)) // max by matched_bits

0 commit comments

Comments
 (0)
Please sign in to comment.