Skip to content

Commit eee1297

Browse files
committed
Apply clippy suggestions
1 parent 6e459eb commit eee1297

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

asyncgit/src/sync/commit_filter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ pub fn filter_commit_by_search(
214214
let author = get_author_of_commit(&commit, &mailmap);
215215
[author.email(), author.name()].iter().any(
216216
|opt_haystack| {
217-
opt_haystack.as_ref().ok().is_some_and(
218-
|haystack| filter.match_text(haystack),
219-
)
217+
opt_haystack.as_ref().is_ok_and(|haystack| {
218+
filter.match_text(haystack)
219+
})
220220
},
221221
)
222222
} else {

src/ui/reflow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'a> LineComposer<'a> for WordWrapper<'a, '_> {
4444
return None;
4545
}
4646
std::mem::swap(&mut self.current_line, &mut self.next_line);
47-
self.next_line.truncate(0);
47+
self.next_line.clear();
4848

4949
let mut current_line_width = self
5050
.current_line
@@ -175,7 +175,7 @@ impl<'a> LineComposer<'a> for LineTruncator<'a, '_> {
175175
return None;
176176
}
177177

178-
self.current_line.truncate(0);
178+
self.current_line.clear();
179179
let mut current_line_width = 0;
180180

181181
let mut skip_rest = false;

0 commit comments

Comments
 (0)