diff options
Diffstat (limited to 'src/librustc_resolve/lib.rs')
| -rw-r--r-- | src/librustc_resolve/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 1b6af605fb0..0058b31088b 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -3072,7 +3072,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { } } - if values.len() > 0 && + if !values.is_empty() && values[smallest] != usize::MAX && values[smallest] < name.len() + 2 && values[smallest] <= max_distance && @@ -3228,7 +3228,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { format!("to call `{}::{}`", path_str, path_name) }; - if msg.len() > 0 { + if !msg.is_empty() { msg = format!(". Did you mean {}?", msg) } |
