From 1b67cf9c535085541d653c6213cd7e7ab5090564 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 16 Oct 2020 07:40:43 +0300 Subject: chore: fix style issues pointed out by clippy --- src/chunkmeta.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/chunkmeta.rs b/src/chunkmeta.rs index 7e0d6f3..37e2ed5 100644 --- a/src/chunkmeta.rs +++ b/src/chunkmeta.rs @@ -67,15 +67,12 @@ impl ChunkMeta { /// Is this a generation chunk? pub fn is_generation(&self) -> bool { - match self.generation { - Some(true) => true, - _ => false, - } + matches!(self.generation, Some(true)) } /// When did this generation end? pub fn ended(&self) -> Option<&str> { - self.ended.as_deref().map(|s| s) + self.ended.as_deref() } /// SHA256 checksum of the content of the chunk. -- cgit v1.2.1