Skip to content

Commit 04806aa

Browse files
committed
Display unmangled symbol in Display if not valid
Closes #18
1 parent 8d2c735 commit 04806aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl<'a> fmt::Display for Demangle<'a> {
249249
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
250250
// Alright, let's do this.
251251
if !self.valid {
252-
return f.write_str(self.inner);
252+
return f.write_str(self.original);
253253
}
254254

255255
let mut inner = self.inner;
@@ -465,4 +465,9 @@ mod tests {
465465
5usage20h)3\0\0\0\0\0\0\07e2734cOsbE\
466466
").to_string();
467467
}
468+
469+
#[test]
470+
fn invalid_no_chop() {
471+
t!("_ZNfooE", "_ZNfooE");
472+
}
468473
}

0 commit comments

Comments
 (0)