Skip to content

Commit 847dbbe

Browse files
committed
Silence various warnings throughout test modules
1 parent 874ea93 commit 847dbbe

35 files changed

+153
-163
lines changed

src/libextra/arc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ mod tests {
507507
use core::prelude::*;
508508
use core::cell::Cell;
509509
use arc::*;
510-
use arc;
511510

512511
#[test]
513512
fn manually_share_arc() {

src/libextra/bitv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ mod tests {
11971197
#[test]
11981198
fn test_from_bytes() {
11991199
let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
1200-
let str = ~"10110110" + ~"00000000" + ~"11111111";
1200+
let str = ~"10110110" + "00000000" + "11111111";
12011201
assert_eq!(bitv.to_str(), str);
12021202
}
12031203

src/libextra/flatpipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ mod test {
927927
fn test_try_recv_none3<P:BytePort>(loader: PortLoader<P>) {
928928
static CONTINUE: [u8, ..4] = [0xAA, 0xBB, 0xCC, 0xDD];
929929
// The control word is followed by garbage
930-
let bytes = CONTINUE.to_vec() + ~[0];
930+
let bytes = CONTINUE.to_vec() + [0];
931931
let port = loader(bytes);
932932
let res: Option<int> = port.try_recv();
933933
assert!(res.is_none());
@@ -951,7 +951,7 @@ mod test {
951951
1, sys::size_of::<u64>()) |len_bytes| {
952952
len_bytes.to_vec()
953953
};
954-
let bytes = CONTINUE.to_vec() + len_bytes + ~[0, 0, 0, 0];
954+
let bytes = CONTINUE.to_vec() + len_bytes + [0, 0, 0, 0];
955955

956956
let port = loader(bytes);
957957

src/libextra/json.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,13 +1880,13 @@ mod tests {
18801880
]));
18811881
assert_eq!(result::unwrap(from_str(
18821882
~"{" +
1883-
~"\"a\": 1.0, " +
1884-
~"\"b\": [" +
1885-
~"true," +
1886-
~"\"foo\\nbar\", " +
1887-
~"{ \"c\": {\"d\": null} } " +
1888-
~"]" +
1889-
~"}")),
1883+
"\"a\": 1.0, " +
1884+
"\"b\": [" +
1885+
"true," +
1886+
"\"foo\\nbar\", " +
1887+
"{ \"c\": {\"d\": null} } " +
1888+
"]" +
1889+
"}")),
18901890
mk_object([
18911891
(~"a", Number(1.0f)),
18921892
(~"b", List(~[

src/libextra/net_ip.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,6 @@ mod test {
375375
use uv;
376376

377377
use core::result;
378-
use core::vec;
379378

380379
#[test]
381380
fn test_ip_ipv4_parse_and_format_ip() {

src/libextra/sha1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ mod tests {
317317
Test {
318318
input:
319319
~"abcdbcdecdefdefgefghfghighij" +
320-
~"hijkijkljklmklmnlmnomnopnopq",
320+
"hijkijkljklmklmnlmnomnopnopq",
321321
output: ~[
322322
0x84u8, 0x98u8, 0x3Eu8, 0x44u8,
323323
0x1Cu8, 0x3Bu8, 0xD2u8, 0x6Eu8,

src/libextra/sort.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,6 @@ fn shift_vec<T:Copy>(dest: &mut [T],
746746

747747
#[cfg(test)]
748748
mod test_qsort3 {
749-
use core::prelude::*;
750-
751749
use sort::*;
752750

753751
use core::vec;

src/libextra/sync.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,6 @@ mod tests {
717717

718718
use core::cast;
719719
use core::cell::Cell;
720-
use core::ptr;
721720
use core::result;
722721
use core::task;
723722
use core::vec;

src/libextra/tempfile.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ mod tests {
3030
use core::prelude::*;
3131

3232
use tempfile::mkdtemp;
33-
use tempfile;
3433
use core::os;
3534

3635
#[test]

src/libextra/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,8 +1206,8 @@ mod tests {
12061206
// abbreviation.
12071207
let rfc822 = local.rfc822();
12081208
let prefix = ~"Fri, 13 Feb 2009 15:31:30 ";
1209-
assert!(rfc822 == prefix + ~"PST" ||
1210-
rfc822 == prefix + ~"Pacific Standard Time");
1209+
assert!(rfc822 == prefix + "PST" ||
1210+
rfc822 == prefix + "Pacific Standard Time");
12111211
12121212
assert_eq!(local.ctime(), ~"Fri Feb 13 15:31:30 2009");
12131213
assert_eq!(local.rfc822z(), ~"Fri, 13 Feb 2009 15:31:30 -0800");

0 commit comments

Comments
 (0)