diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-27 11:09:11 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-27 11:09:11 +0200 |
commit | 96cab4a2fda6726437403b00cfcba1ee69bc9432 (patch) | |
tree | 1e97546dc89c06028a7a0f42b636efd87c7c2420 | |
parent | 4618ccc2a2dbc73503c32464e2a05043e4f04227 (diff) | |
download | obnam2-96cab4a2fda6726437403b00cfcba1ee69bc9432.tar.gz |
refactor: use matches! for clarity
-rw-r--r-- | src/chunkmeta.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/chunkmeta.rs b/src/chunkmeta.rs index fc5ffff..37e2ed5 100644 --- a/src/chunkmeta.rs +++ b/src/chunkmeta.rs @@ -67,10 +67,7 @@ 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? |