One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
e7540d2833
commit
8ba2f77148
138 changed files with 1328 additions and 1366 deletions
|
@ -66,9 +66,9 @@ pub(crate) fn active_match_index(
|
|||
None
|
||||
} else {
|
||||
match ranges.binary_search_by(|probe| {
|
||||
if probe.end.cmp(&cursor, &*buffer).is_lt() {
|
||||
if probe.end.cmp(cursor, &*buffer).is_lt() {
|
||||
Ordering::Less
|
||||
} else if probe.start.cmp(&cursor, &*buffer).is_gt() {
|
||||
} else if probe.start.cmp(cursor, &*buffer).is_gt() {
|
||||
Ordering::Greater
|
||||
} else {
|
||||
Ordering::Equal
|
||||
|
@ -86,7 +86,7 @@ pub(crate) fn match_index_for_direction(
|
|||
direction: Direction,
|
||||
buffer: &MultiBufferSnapshot,
|
||||
) -> usize {
|
||||
if ranges[index].start.cmp(&cursor, &buffer).is_gt() {
|
||||
if ranges[index].start.cmp(cursor, buffer).is_gt() {
|
||||
if direction == Direction::Prev {
|
||||
if index == 0 {
|
||||
index = ranges.len() - 1;
|
||||
|
@ -94,7 +94,7 @@ pub(crate) fn match_index_for_direction(
|
|||
index -= 1;
|
||||
}
|
||||
}
|
||||
} else if ranges[index].end.cmp(&cursor, &buffer).is_lt() {
|
||||
} else if ranges[index].end.cmp(cursor, buffer).is_lt() {
|
||||
if direction == Direction::Next {
|
||||
index = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue