From 64c93a7f8a4babe7ef794ed053cb06baef1dcd3b Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Wed, 17 Feb 2021 10:20:10 -0500 Subject: Lint (#527) * Silence a clippy warning * Manually fix cargo fmt complaint https://github.com/dandavison/delta/runs/1918867251?check_suite_focus=true#logs --- src/delta.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/delta.rs b/src/delta.rs index 81871068..7d52eae1 100644 --- a/src/delta.rs +++ b/src/delta.rs @@ -36,7 +36,10 @@ pub enum Source { impl State { fn is_in_hunk(&self) -> bool { - matches!(*self, State::HunkHeader | State::HunkZero | State::HunkMinus(_) | State::HunkPlus(_)) + matches!( + *self, + State::HunkHeader | State::HunkZero | State::HunkMinus(_) | State::HunkPlus(_) + ) } } @@ -223,6 +226,7 @@ impl<'a> StateMachine<'a> { Ok(()) } + #[allow(clippy::unnecessary_wraps)] fn handle_file_meta_diff_line(&mut self) -> std::io::Result { self.painter.paint_buffered_minus_and_plus_lines(); self.state = State::FileMeta; -- cgit v1.2.3