Skip to content

Commit 0bdc99d

Browse files
committed
std: removed some warnings in tests.
1 parent 4834661 commit 0bdc99d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/libstd/rt/uv/file.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,7 @@ mod test {
370370
use unstable::run_in_bare_thread;
371371
use path::Path;
372372
use rt::uv::{Loop, Buf, slice_to_uv_buf};
373-
use libc::{c_int, O_CREAT, O_RDWR, O_RDONLY,
374-
S_IWUSR, S_IRUSR};
373+
use libc::{O_CREAT, O_RDWR, O_RDONLY, S_IWUSR, S_IRUSR};
375374

376375
#[test]
377376
fn file_test_full_simple() {
@@ -603,7 +602,7 @@ mod test {
603602
assert!(uverr.is_none());
604603
let loop_ = req.get_loop();
605604
let stat_req = FsRequest::new();
606-
do stat_req.stat(&loop_, &path) |req, uverr| {
605+
do stat_req.stat(&loop_, &path) |_req, uverr| {
607606
assert!(uverr.is_some());
608607
}
609608
}
@@ -628,11 +627,11 @@ mod test {
628627
do mkdir_req.mkdir(&loop_, &path, mode as int) |req,uverr| {
629628
assert!(uverr.is_some());
630629
let loop_ = req.get_loop();
631-
let stat = req.get_stat();
630+
let _stat = req.get_stat();
632631
let rmdir_req = FsRequest::new();
633632
do rmdir_req.rmdir(&loop_, &path) |req,uverr| {
634633
assert!(uverr.is_none());
635-
let loop_ = req.get_loop();
634+
let _loop = req.get_loop();
636635
}
637636
}
638637
}
@@ -646,7 +645,7 @@ mod test {
646645
let mut loop_ = Loop::new();
647646
let path = "./tmp/never_existed_dir";
648647
let rmdir_req = FsRequest::new();
649-
do rmdir_req.rmdir(&loop_, &path) |req,uverr| {
648+
do rmdir_req.rmdir(&loop_, &path) |_req, uverr| {
650649
assert!(uverr.is_some());
651650
}
652651
loop_.run();

src/libstd/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ pub mod raw {
12221222
unsafe {
12231223
let input = bytes!("zero", "\x00", "one", "\x00", "\x00");
12241224
let ptr = vec::raw::to_ptr(input);
1225-
let mut result = from_c_multistring(ptr as *libc::c_char, None);
1225+
let result = from_c_multistring(ptr as *libc::c_char, None);
12261226
assert!(result.len() == 2);
12271227
let mut ctr = 0;
12281228
for x in result.iter() {

0 commit comments

Comments
 (0)