Skip to content

Commit 3896895

Browse files
committed
Fix clippy issues in rust 1.77
1 parent 9dbc0ac commit 3896895

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/commands/last.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ fn run(context: &Context, args: &Args) -> Result<()> {
7373

7474
let last_line_terminated = buffers
7575
.back()
76-
.map(|buf| buf.is_terminated_with(separator))
77-
.unwrap_or_default();
76+
.is_some_and(|buf| buf.is_terminated_with(separator));
7877

7978
if !last_line_terminated {
8079
total_lines += 1;

src/pattern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ impl Parser<'_> {
413413
}
414414

415415
fn peek(&mut self) -> Option<char> {
416-
self.iterator.peek().map(Clone::clone)
416+
self.iterator.peek().copied()
417417
}
418418

419419
fn next(&mut self) -> Option<char> {

0 commit comments

Comments
 (0)