sort: use Range.is_empty
@@ -659,10 +659,7 @@ impl<'a> Line<'a> {
" ".repeat(UnicodeWidthStr::width(&line[..selection.start]))
)?;
- // TODO: Once our minimum supported rust version is at least 1.47, use selection.is_empty() instead.
- #[allow(clippy::len_zero)]
- {
- if selection.len() == 0 {
+ if selection.is_empty() {
writeln!(writer, "^ no match for key")?;
} else {
writeln!(
@@ -672,7 +669,6 @@ impl<'a> Line<'a> {
)?;
}
}
- }
if settings.mode != SortMode::Random
&& !settings.stable
&& !settings.unique
