*: Fix clippy warnings (#2227)

This commit is contained in:
Roman
2021-09-14 16:00:05 +03:00
committed by GitHub
parent 5f68c74177
commit b79fd02f0b
25 changed files with 93 additions and 124 deletions

View File

@ -523,10 +523,7 @@ pub enum KeepAlive {
impl KeepAlive {
/// Returns true for `Yes`, false otherwise.
pub fn is_yes(&self) -> bool {
match *self {
KeepAlive::Yes => true,
_ => false,
}
matches!(*self, KeepAlive::Yes)
}
}