diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-02-17 10:20:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 10:20:10 -0500 |
commit | 64c93a7f8a4babe7ef794ed053cb06baef1dcd3b (patch) | |
tree | d0845eb7f2cc598b112f5d5e8c2f7673c50e2274 /src/delta.rs | |
parent | 3fbb7394135f5979186b85ce948c9224771f6a24 (diff) |
Lint (#527)
* Silence a clippy warning
* Manually fix cargo fmt complaint
https://github.com/dandavison/delta/runs/1918867251?check_suite_focus=true#logs
Diffstat (limited to 'src/delta.rs')
-rw-r--r-- | src/delta.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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<bool> { self.painter.paint_buffered_minus_and_plus_lines(); self.state = State::FileMeta; |