From 02621c61507fea025652d8f12fb3e63b612e15cc Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 19 Oct 2020 16:25:06 +0100 Subject: [PATCH] vhost_user_fs: sandbox: Fix clippy errors Signed-off-by: Rob Bradford --- vhost_user_fs/src/sandbox.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vhost_user_fs/src/sandbox.rs b/vhost_user_fs/src/sandbox.rs index 9bc362cc0..76e9c56d7 100644 --- a/vhost_user_fs/src/sandbox.rs +++ b/vhost_user_fs/src/sandbox.rs @@ -260,11 +260,8 @@ impl Sandbox { // /proc/sys/fs/nr_open is a sysctl file that shows the maximum number // of file-handles a process can allocate. let path = "/proc/sys/fs/nr_open"; - let max_str = fs::read_to_string(path).map_err(|e| Error::ReadProc(e))?; - let max = max_str - .trim() - .parse() - .map_err(|e| Error::InvalidNrOpen(e))?; + let max_str = fs::read_to_string(path).map_err(Error::ReadProc)?; + let max = max_str.trim().parse().map_err(Error::InvalidNrOpen)?; let limit = libc::rlimit { rlim_cur: max,