mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
No need to map the max_distance
This commit is contained in:
parent
ed7c6819e4
commit
d708d7fb79
@ -54,7 +54,7 @@ where
|
||||
T: Iterator<Item = &'a Symbol>,
|
||||
{
|
||||
let lookup = &lookup.as_str();
|
||||
let max_dist = dist.map_or_else(|| cmp::max(lookup.len(), 3) / 3, |d| d);
|
||||
let max_dist = dist.unwrap_or_else(|| cmp::max(lookup.len(), 3) / 3);
|
||||
let name_vec: Vec<&Symbol> = iter_names.collect();
|
||||
|
||||
let (case_insensitive_match, levenshtein_match) = name_vec
|
||||
|
Loading…
Reference in New Issue
Block a user