Simlify with matches!()

This commit is contained in:
Veetaha
2020-06-28 04:02:03 +03:00
parent 513924a7e0
commit e75e2ae5b6
20 changed files with 32 additions and 98 deletions

View File

@@ -28,16 +28,10 @@ pub enum Verbosity {
impl Verbosity {
pub fn is_verbose(self) -> bool {
match self {
Verbosity::Verbose | Verbosity::Spammy => true,
_ => false,
}
matches!(self, Verbosity::Verbose | Verbosity::Spammy)
}
pub fn is_spammy(self) -> bool {
match self {
Verbosity::Spammy => true,
_ => false,
}
matches!(self, Verbosity::Spammy)
}
}