summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-08-27 10:28:04 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-08-28 18:18:41 +0200
commitfae9f82c67aeb8d86ea66489e106f47c65f72ef5 (patch)
tree120ee334ee9f827a737e39d78fd53b7cc4fe3a3b
parent69dce9ed9f0f2e0be1746f7925d45d33587a59dd (diff)
[No-auto] lib/entry/ref: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--lib/entry/libimagentryref/src/reference.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/entry/libimagentryref/src/reference.rs b/lib/entry/libimagentryref/src/reference.rs
index 029c38e5..7c5a5c1a 100644
--- a/lib/entry/libimagentryref/src/reference.rs
+++ b/lib/entry/libimagentryref/src/reference.rs
@@ -288,11 +288,8 @@ impl<'a, H> MutRef for MutRefWithHasher<'a, H>
let _ = header.delete("ref.relpath").context("Removing ref.relpath")?;
if let Some(hash_tbl) = header.read_mut("ref.hash")? {
- match hash_tbl {
- Value::Table(ref mut tbl) => *tbl = Map::new(),
- _ => {
- // should not happen
- }
+ if let Value::Table(ref mut tbl) = hash_tbl {
+ *tbl = Map::new();
}
}