From fae9f82c67aeb8d86ea66489e106f47c65f72ef5 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 27 Aug 2019 10:28:04 +0200 Subject: [PATCH] [No-auto] lib/entry/ref: Fix Clippy warnings Signed-off-by: flip1995 Signed-off-by: Matthias Beyer --- lib/entry/libimagentryref/src/reference.rs | 7 ++----- 1 file 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(); } }