Skip to content

Commit 0f54f32

Browse files
author
Jorge Aparicio
committed
libflate: remove unnecessary as_slice() calls
1 parent 5257a5b commit 0f54f32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libflate/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ mod tests {
128128
debug!("{} bytes deflated to {} ({:.1}% size)",
129129
input.len(), cmp.len(),
130130
100.0 * ((cmp.len() as f64) / (input.len() as f64)));
131-
assert_eq!(input.as_slice(), out.as_slice());
131+
assert_eq!(input, out.as_slice());
132132
}
133133
}
134134

@@ -137,6 +137,6 @@ mod tests {
137137
let bytes = vec!(1, 2, 3, 4, 5);
138138
let deflated = deflate_bytes(bytes.as_slice()).expect("deflation failed");
139139
let inflated = inflate_bytes(deflated.as_slice()).expect("inflation failed");
140-
assert_eq!(inflated.as_slice(), bytes.as_slice());
140+
assert_eq!(inflated.as_slice(), bytes);
141141
}
142142
}

0 commit comments

Comments
 (0)