提交 0bdc99d8 编写于 作者: E Erick Tryzelaar

std: removed some warnings in tests.

上级 4834661c
......@@ -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 @@ fn file_test_mk_rm_dir() {
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 @@ fn file_test_mkdir_chokes_on_double_create() {
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 @@ fn file_test_rmdir_chokes_on_nonexistant_path() {
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();
......
......@@ -1222,7 +1222,7 @@ fn test_str_multistring_parsing() {
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() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册