summaryrefslogtreecommitdiff
path: root/tests
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 /tests
parent57fe78a3cd79efae8bc9ce89e085cf65dfaae9a9 (diff)
downloadnix-62c5a727eac3c5f85853e17612d7fd0c6aa47c2f.zip
Fix warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/unistd.rs9
1 files changed, 5 insertions, 4 deletions
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()));
}