diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-10-16 07:40:43 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-10-16 07:40:43 +0300 |
commit | 1b67cf9c535085541d653c6213cd7e7ab5090564 (patch) | |
tree | cb9b1fd96040ac12fb766c903d681dee154cc386 /src | |
parent | 90fe57e7b5b383195d6155578c00d10549ead0d3 (diff) | |
download | obnam2-1b67cf9c535085541d653c6213cd7e7ab5090564.tar.gz |
chore: fix style issues pointed out by clippy
Diffstat (limited to 'src')
-rw-r--r-- | src/chunkmeta.rs | 7 |
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. |