diff options
author | Trinity Pointard <trinity.pointard@gmail.com> | 2021-04-23 21:57:32 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-05-03 22:11:41 +0200 |
commit | 4a1e079e8fe2c17078a274ef17c8d63e9b1bb96e (patch) | |
tree | 931ae67ad8f1fc22424c3e21394de188905a9586 /src/model/block_ref_table.rs | |
parent | f5a0cf0414fc3db7affcbe7ffcf4e251a2afd192 (diff) | |
download | garage-4a1e079e8fe2c17078a274ef17c8d63e9b1bb96e.tar.gz garage-4a1e079e8fe2c17078a274ef17c8d63e9b1bb96e.zip |
fix clippy warnings on model
Diffstat (limited to 'src/model/block_ref_table.rs')
-rw-r--r-- | src/model/block_ref_table.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/block_ref_table.rs b/src/model/block_ref_table.rs index 95451e9c..c2d77fd3 100644 --- a/src/model/block_ref_table.rs +++ b/src/model/block_ref_table.rs @@ -50,7 +50,7 @@ impl TableSchema for BlockRefTable { type Filter = DeletedFilter; fn updated(&self, old: Option<Self::E>, new: Option<Self::E>) { - let block = &old.as_ref().or(new.as_ref()).unwrap().block; + let block = &old.as_ref().or_else(|| new.as_ref()).unwrap().block; let was_before = old.as_ref().map(|x| !x.deleted.get()).unwrap_or(false); let is_after = new.as_ref().map(|x| !x.deleted.get()).unwrap_or(false); if is_after && !was_before { |