Skip to content

remove test warnings #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/sys/ioctl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
//! from [rust-spidev](https://github.com/posborne/rust-spidev).
//!
//! ```
//! #[macro_use] extern crate nix;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be actually able to completely remove this line. This is automatically inserted by the doctest script.

//!
//! #[allow(non_camel_case_types)]
//! pub struct spi_ioc_transfer {
//! pub tx_buf: u64,
Expand Down
6 changes: 3 additions & 3 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
/// }
/// ```
///
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down