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(); } }