diff options
author | Carl Lerche <me@carllerche.com> | 2015-02-10 22:19:04 -0800 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2015-02-10 22:19:04 -0800 |
commit | 62c5a727eac3c5f85853e17612d7fd0c6aa47c2f (patch) | |
tree | 95c44cc4e99ff95fcb49c7c2cc962b4e88aa1816 | |
parent | 57fe78a3cd79efae8bc9ce89e085cf65dfaae9a9 (diff) | |
download | nix-62c5a727eac3c5f85853e17612d7fd0c6aa47c2f.zip |
Fix warnings
-rw-r--r-- | Cargo.toml | 3 | ||||
-rw-r--r-- | src/lib.rs | 7 | ||||
-rw-r--r-- | tests/unistd.rs | 9 |
3 files changed, 12 insertions, 7 deletions
@@ -10,3 +10,6 @@ exclude = [".gitignore", ".travis.yml", "tests/**/*"] [dependencies] bitflags = "0.1" + +[dev-dependencies] +rand = "0.1.2" @@ -1,9 +1,10 @@ #![crate_name = "nix"] -#![feature(linkage)] -#![allow(unstable)] +#![feature(core, linkage, libc, hash, os, path, std_misc)] #![allow(non_camel_case_types)] -#[macro_use] extern crate bitflags; + +#[macro_use] +extern crate bitflags; extern crate libc; extern crate core; diff --git a/tests/unistd.rs b/tests/unistd.rs index 254b6887..e174d823 100644 --- a/tests/unistd.rs +++ b/tests/unistd.rs @@ -1,13 +1,14 @@ -#![allow(unstable)] +#![feature(core)] extern crate nix; +extern crate rand; #[cfg(test)] mod test { use nix::unistd::{writev, readv, Iovec, pipe, close, read, write}; use std::cmp::min; use std::iter::repeat; - use std::rand::{thread_rng, Rng}; + use rand::{thread_rng, Rng}; use nix::unistd::{fork}; use nix::sys::wait::{waitpid, WaitStatus}; @@ -16,8 +17,8 @@ mod test { #[test] fn test_writev() { let mut to_write = Vec::with_capacity(16 * 128); - for _ in range(0, 16) { - let s:String = thread_rng().gen_ascii_chars().take(128).collect(); + for _ in 0..16 { + let s: String = thread_rng().gen_ascii_chars().take(128).collect(); let b = s.as_bytes(); to_write.extend(b.iter().map(|x| x.clone())); } |