summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorking6cong <king6cong@gmail.com>2017-04-19 11:38:40 +0800
committerking6cong <king6cong@gmail.com>2017-04-21 11:55:52 +0800
commit31abe0041be87ef9abaebd259d32c998194c1598 (patch)
tree4a6d1f799234924b2afc15c8f17035931a70553f
parent7b5dd7867e9fd30513432f852a27bff72a8478f5 (diff)
downloadnix-31abe0041be87ef9abaebd259d32c998194c1598.zip
remove test warnings
-rw-r--r--src/sys/ioctl/mod.rs2
-rw-r--r--src/unistd.rs6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/sys/ioctl/mod.rs b/src/sys/ioctl/mod.rs
index a04e9d39..0a95ec77 100644
--- a/src/sys/ioctl/mod.rs
+++ b/src/sys/ioctl/mod.rs
@@ -35,8 +35,6 @@
//! from [rust-spidev](https://github.com/posborne/rust-spidev).
//!
//! ```
-//! #[macro_use] extern crate nix;
-//!
//! #[allow(non_camel_case_types)]
//! pub struct spi_ioc_transfer {
//! pub tx_buf: u64,
diff --git a/src/unistd.rs b/src/unistd.rs
index 187154bd..566212d0 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -59,7 +59,7 @@ impl ForkResult {
/// println!("Continuing execution in parent process, new child has pid: {}", child);
/// }
/// Ok(ForkResult::Child) => println!("I'm a new child process"),
-/// Err(e) => println!("Fork failed"),
+/// Err(_) => println!("Fork failed"),
/// }
/// ```
///
@@ -272,7 +272,7 @@ pub fn fchdir(dirfd: RawFd) -> Result<()> {
/// - the path already exists
/// - the path name is too long (longer than `PATH_MAX`, usually 4096 on linux, 1024 on OS X)
///
-/// For a full list consult
+/// For a full list consult
/// [man mkdir(2)](http://man7.org/linux/man-pages/man2/mkdir.2.html#ERRORS)
///
/// # Example
@@ -798,7 +798,7 @@ pub fn sleep(seconds: libc::c_uint) -> c_uint {
/// ```rust
/// use nix::unistd;
///
-/// let fd = match unistd::mkstemp("/tmp/tempfile_XXXXXX") {
+/// let _ = match unistd::mkstemp("/tmp/tempfile_XXXXXX") {
/// Ok((fd, path)) => {
/// unistd::unlink(path.as_path()).unwrap(); // flag file to be deleted at app termination
/// fd