mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-07-07 10:15:45 +00:00
vhost_user_fs: sandbox: Fix clippy errors
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
cf86ca15c2
commit
02621c6150
@ -260,11 +260,8 @@ impl Sandbox {
|
|||||||
// /proc/sys/fs/nr_open is a sysctl file that shows the maximum number
|
// /proc/sys/fs/nr_open is a sysctl file that shows the maximum number
|
||||||
// of file-handles a process can allocate.
|
// of file-handles a process can allocate.
|
||||||
let path = "/proc/sys/fs/nr_open";
|
let path = "/proc/sys/fs/nr_open";
|
||||||
let max_str = fs::read_to_string(path).map_err(|e| Error::ReadProc(e))?;
|
let max_str = fs::read_to_string(path).map_err(Error::ReadProc)?;
|
||||||
let max = max_str
|
let max = max_str.trim().parse().map_err(Error::InvalidNrOpen)?;
|
||||||
.trim()
|
|
||||||
.parse()
|
|
||||||
.map_err(|e| Error::InvalidNrOpen(e))?;
|
|
||||||
|
|
||||||
let limit = libc::rlimit {
|
let limit = libc::rlimit {
|
||||||
rlim_cur: max,
|
rlim_cur: max,
|
||||||
|
Loading…
Reference in New Issue
Block a user