From 466791b187cbb294fb1b1b07939a30ab032ab10c Mon Sep 17 00:00:00 2001 From: LingMan Date: Fri, 26 Aug 2022 13:52:15 +0200 Subject: [PATCH] Fix warning `unused import: self` when compiling tests on non-Linux targets. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0b92ea0e..5ddacab8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1088,7 +1088,7 @@ mod test { #[cfg(unix)] use crate::advice::Advice; - use std::fs::{self, OpenOptions}; + use std::fs::OpenOptions; use std::io::{Read, Write}; #[cfg(unix)] use std::os::unix::io::AsRawFd; @@ -1622,7 +1622,7 @@ mod test { /// Returns true if a non-zero amount of memory is locked. #[cfg(target_os = "linux")] fn is_locked() -> bool { - let status = &fs::read_to_string("/proc/self/status") + let status = &std::fs::read_to_string("/proc/self/status") .expect("/proc/self/status should be available"); for line in status.lines() { if line.starts_with("VmLck:") {