From 47ebef3af8be22a08e6321a9557d35975b97902e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 17 Mar 2018 22:17:41 +0100 Subject: [PATCH] nfs: minor cleanup --- rust/src/nfs/nfs.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rust/src/nfs/nfs.rs b/rust/src/nfs/nfs.rs index d36e32a8af..075b0dbb26 100644 --- a/rust/src/nfs/nfs.rs +++ b/rust/src/nfs/nfs.rs @@ -932,13 +932,10 @@ impl NFSState { SCLogDebug!("RESPONSE CREATE file_name {:?}", xidmap.file_name); nfs_status = nfs3_create_record.status; - match nfs3_create_record.handle { - Some(h) => { - SCLogDebug!("handle {:?}", h); - self.namemap.insert(h.value.to_vec(), xidmap.file_name.to_vec()); - resp_handle = h.value.to_vec(); - }, - _ => { }, + if let Some(h) = nfs3_create_record.handle { + SCLogDebug!("handle {:?}", h); + self.namemap.insert(h.value.to_vec(), xidmap.file_name.to_vec()); + resp_handle = h.value.to_vec(); } },