summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2015-02-10 22:19:04 -0800
committerCarl Lerche <me@carllerche.com>2015-02-10 22:19:04 -0800
commit62c5a727eac3c5f85853e17612d7fd0c6aa47c2f (patch)
tree95c44cc4e99ff95fcb49c7c2cc962b4e88aa1816
parent57fe78a3cd79efae8bc9ce89e085cf65dfaae9a9 (diff)
downloadnix-62c5a727eac3c5f85853e17612d7fd0c6aa47c2f.zip
Fix warnings
-rw-r--r--Cargo.toml3
-rw-r--r--src/lib.rs7
-rw-r--r--tests/unistd.rs9
3 files changed, 12 insertions, 7 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 809230dc..59aa2514 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,3 +10,6 @@ exclude = [".gitignore", ".travis.yml", "tests/**/*"]
[dependencies]
bitflags = "0.1"
+
+[dev-dependencies]
+rand = "0.1.2"
diff --git a/src/lib.rs b/src/lib.rs
index 192eeccf..7cd9ee55 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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()));
}