From c66e5432e7fdcd35767cb55aeb5af657ef480871 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 9 Aug 2024 11:10:47 +0200 Subject: [PATCH] shared-cache: minor style adaptation (more concise & readable) Signed-off-by: Wolfgang Bumiller --- proxmox-shared-cache/src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/proxmox-shared-cache/src/lib.rs b/proxmox-shared-cache/src/lib.rs index 89c44102..d0b2148a 100644 --- a/proxmox-shared-cache/src/lib.rs +++ b/proxmox-shared-cache/src/lib.rs @@ -58,13 +58,8 @@ impl SharedCache { None => Ok(None), } } - Err(err) => { - if err.kind() != ErrorKind::NotFound { - Err(err.into()) - } else { - Ok(None) - } - } + Err(err) if err.kind() == ErrorKind::NotFound => Ok(None), + Err(err) => Err(err.into()), } }