From 0bdc99d81f038fe0e480eeb87b380b11b8e72ba7 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Wed, 18 Sep 2013 11:45:17 -0700 Subject: [PATCH] std: removed some warnings in tests. --- src/libstd/rt/uv/file.rs | 11 +++++------ src/libstd/str.rs | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/libstd/rt/uv/file.rs b/src/libstd/rt/uv/file.rs index fcd8800fadd..f37402d944e 100644 --- a/src/libstd/rt/uv/file.rs +++ b/src/libstd/rt/uv/file.rs @@ -370,8 +370,7 @@ mod test { use unstable::run_in_bare_thread; use path::Path; use rt::uv::{Loop, Buf, slice_to_uv_buf}; - use libc::{c_int, O_CREAT, O_RDWR, O_RDONLY, - S_IWUSR, S_IRUSR}; + use libc::{O_CREAT, O_RDWR, O_RDONLY, S_IWUSR, S_IRUSR}; #[test] fn file_test_full_simple() { @@ -603,7 +602,7 @@ mod test { assert!(uverr.is_none()); let loop_ = req.get_loop(); let stat_req = FsRequest::new(); - do stat_req.stat(&loop_, &path) |req, uverr| { + do stat_req.stat(&loop_, &path) |_req, uverr| { assert!(uverr.is_some()); } } @@ -628,11 +627,11 @@ mod test { do mkdir_req.mkdir(&loop_, &path, mode as int) |req,uverr| { assert!(uverr.is_some()); let loop_ = req.get_loop(); - let stat = req.get_stat(); + let _stat = req.get_stat(); let rmdir_req = FsRequest::new(); do rmdir_req.rmdir(&loop_, &path) |req,uverr| { assert!(uverr.is_none()); - let loop_ = req.get_loop(); + let _loop = req.get_loop(); } } } @@ -646,7 +645,7 @@ mod test { let mut loop_ = Loop::new(); let path = "./tmp/never_existed_dir"; let rmdir_req = FsRequest::new(); - do rmdir_req.rmdir(&loop_, &path) |req,uverr| { + do rmdir_req.rmdir(&loop_, &path) |_req, uverr| { assert!(uverr.is_some()); } loop_.run(); diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 9562346c70d..505b1d20d01 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -1222,7 +1222,7 @@ pub mod raw { unsafe { let input = bytes!("zero", "\x00", "one", "\x00", "\x00"); let ptr = vec::raw::to_ptr(input); - let mut result = from_c_multistring(ptr as *libc::c_char, None); + let result = from_c_multistring(ptr as *libc::c_char, None); assert!(result.len() == 2); let mut ctr = 0; for x in result.iter() {