summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-10-16 07:40:43 +0300
committerLars Wirzenius <liw@liw.fi>2020-10-16 07:40:43 +0300
commit1b67cf9c535085541d653c6213cd7e7ab5090564 (patch)
treecb9b1fd96040ac12fb766c903d681dee154cc386 /src
parent90fe57e7b5b383195d6155578c00d10549ead0d3 (diff)
downloadobnam2-1b67cf9c535085541d653c6213cd7e7ab5090564.tar.gz
chore: fix style issues pointed out by clippy
Diffstat (limited to 'src')
-rw-r--r--src/chunkmeta.rs7
1 files changed, 2 insertions, 5 deletions
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.