Skip to content

Commit 6ffe71e

Browse files
committed
Auto merge of #401 - fiveop:fix_warnings, r=posborne
Get rid of a few warnings during compilation of tests
2 parents 5f963ad + 51be2c9 commit 6ffe71e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/test_mount.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod test_mount {
1515
use std::os::unix::fs::PermissionsExt;
1616
use std::process::{self, Command};
1717

18-
use libc::{self, EACCES, EROFS};
18+
use libc::{EACCES, EROFS};
1919

2020
use nix::mount::{mount, umount, MsFlags, MS_BIND, MS_RDONLY, MS_NOEXEC};
2121
use nix::sched::{unshare, CLONE_NEWNS, CLONE_NEWUSER};
@@ -179,8 +179,8 @@ exit 23";
179179
let mut handle = stderr.lock();
180180
writeln!(handle,
181181
"unshare failed: {}. Are unprivileged user namespaces available?",
182-
e);
183-
writeln!(handle, "mount is not being tested");
182+
e).unwrap();
183+
writeln!(handle, "mount is not being tested").unwrap();
184184
// Exit with success because not all systems support unprivileged user namespaces, and
185185
// that's not what we're testing for.
186186
process::exit(0);

test/test_signalfd.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
extern crate nix;
22

33
#[cfg(feature = "signalfd")]
4-
54
use nix::sys::signalfd::SignalFd;
5+
#[cfg(feature = "signalfd")]
66
use nix::sys::signal;
7+
#[cfg(feature = "signalfd")]
78
use nix::unistd;
89

910
#[cfg(feature = "signalfd")]

0 commit comments

Comments
 (0)