diff options
| author | bors <bors@rust-lang.org> | 2020-10-30 14:24:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-30 14:24:02 +0000 |
| commit | ffe52882ed79be67344dd6085559e308241e7f60 (patch) | |
| tree | dea8fd60ec5b2aa448b12e491cf8d23053a7892a /compiler/rustc_errors/src/lib.rs | |
| parent | 388ef349043f20a1a8a3011eaf49dee220485e0a (diff) | |
| parent | 5339bd1ebeb76ea7304ff07dcf8e6c317ba0ced8 (diff) | |
| download | rust-ffe52882ed79be67344dd6085559e308241e7f60.tar.gz rust-ffe52882ed79be67344dd6085559e308241e7f60.zip | |
Auto merge of #78424 - jyn514:THE-PAPERCLIP-COMETH, r=davidtwco
Fix some more clippy warnings Found while working on https://github.com/rust-lang/rust/pull/77351. It turns out that `x.py clippy --fix` does work on that branch as long as you pass `CARGOFLAGS=--lib`.
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 2e8a4ef327a..2ebc4a7e9d9 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -91,10 +91,7 @@ pub enum SuggestionStyle { impl SuggestionStyle { fn hide_inline(&self) -> bool { - match *self { - SuggestionStyle::ShowCode => false, - _ => true, - } + !matches!(*self, SuggestionStyle::ShowCode) } } @@ -1038,10 +1035,7 @@ impl Level { } pub fn is_failure_note(&self) -> bool { - match *self { - FailureNote => true, - _ => false, - } + matches!(*self, FailureNote) } } |
