Skip to content

Commit 90e7f49

Browse files
committed
rustc_serialize: make assert more informative.
1 parent 11fb21f commit 90e7f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_serialize/src/opaque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ impl<'a> serialize::Decoder for Decoder<'a> {
666666
fn read_str(&mut self) -> Result<Cow<'_, str>, Self::Error> {
667667
let len = self.read_usize()?;
668668
let sentinel = self.data[self.position + len];
669-
assert!(sentinel == STR_SENTINEL);
669+
assert_eq!(sentinel, STR_SENTINEL);
670670
let s = unsafe {
671671
std::str::from_utf8_unchecked(&self.data[self.position..self.position + len])
672672
};

0 commit comments

Comments
 (0)