diff options
author | Veetaha <[email protected]> | 2020-06-28 02:02:03 +0100 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-06-28 02:03:59 +0100 |
commit | e75e2ae5b6b6b1364368ceb3d4081b6508b2f001 (patch) | |
tree | e88a9920a908bfdf66c156ab582ce90d77d55c2f /crates/rust-analyzer/src/cli.rs | |
parent | 513924a7e01ef81a03869249c902daf148439736 (diff) |
Simlify with matches!()
Diffstat (limited to 'crates/rust-analyzer/src/cli.rs')
-rw-r--r-- | crates/rust-analyzer/src/cli.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/rust-analyzer/src/cli.rs b/crates/rust-analyzer/src/cli.rs index 39ce77900..c5faec83a 100644 --- a/crates/rust-analyzer/src/cli.rs +++ b/crates/rust-analyzer/src/cli.rs | |||
@@ -28,16 +28,10 @@ pub enum Verbosity { | |||
28 | 28 | ||
29 | impl Verbosity { | 29 | impl Verbosity { |
30 | pub fn is_verbose(self) -> bool { | 30 | pub fn is_verbose(self) -> bool { |
31 | match self { | 31 | matches!(self, Verbosity::Verbose | Verbosity::Spammy) |
32 | Verbosity::Verbose | Verbosity::Spammy => true, | ||
33 | _ => false, | ||
34 | } | ||
35 | } | 32 | } |
36 | pub fn is_spammy(self) -> bool { | 33 | pub fn is_spammy(self) -> bool { |
37 | match self { | 34 | matches!(self, Verbosity::Spammy) |
38 | Verbosity::Spammy => true, | ||
39 | _ => false, | ||
40 | } | ||
41 | } | 35 | } |
42 | } | 36 | } |
43 | 37 | ||