diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 67bb5a5..f676e36 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -37,7 +37,7 @@ fn get_all_processes() -> Vec { let proc_root = PathBuf::from(ROOT).join(pid.to_string()); // for 2.6.39 <= kernel < 3.6 fstat doesn't support O_PATH see https://github.com/eminence/procfs/issues/265 - let flags = match *KERNEL { + let flags = match KERNEL { Some(v) if v < String::from("3.6.0") => OFlags::DIRECTORY | OFlags::CLOEXEC, Some(_) | None => OFlags::PATH | OFlags::DIRECTORY | OFlags::CLOEXEC, }; @@ -153,7 +153,7 @@ fn get_socket_inodes, Q: AsRef>( let p = path.as_ref(); let root = base.as_ref().join(p); // for 2.6.39 <= kernel < 3.6 fstat doesn't support O_PATH see https://github.com/eminence/procfs/issues/265 - let flags = match *KERNEL { + let flags = match KERNEL { Some(v) if v < String::from("3.6.0") => OFlags::NOFOLLOW | OFlags::CLOEXEC, Some(_) | None => OFlags::NOFOLLOW | OFlags::PATH | OFlags::CLOEXEC, };