Skip to content

Commit 47baebc

Browse files
committed
Remove un-needed comparisons, suppress warnings
1 parent 2093952 commit 47baebc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/hash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ pub fn test_hash_no_bytes_dropped_64() {
505505
assert val.hash() != zero_byte(val, 7).hash();
506506

507507
fn zero_byte(val: u64, byte: uint) -> u64 {
508-
assert 0 <= byte; assert byte < 8;
508+
assert byte < 8;
509509
val & !(0xff << (byte * 8))
510510
}
511511
}
@@ -520,7 +520,7 @@ pub fn test_hash_no_bytes_dropped_32() {
520520
assert val.hash() != zero_byte(val, 3).hash();
521521

522522
fn zero_byte(val: u32, byte: uint) -> u32 {
523-
assert 0 <= byte; assert byte < 4;
523+
assert byte < 4;
524524
val & !(0xff << (byte * 8))
525525
}
526526
}

0 commit comments

Comments
 (0)