Skip to content

Commit

Permalink
Fixing to work with nightly (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlokSwaminathan authored Jul 4, 2024
1 parent 004bdda commit 8f086a7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,7 @@ pub fn panic_handle(info: &core::panic::PanicInfo) -> ! {
("", 0, 0)
};

let message = if let Some(args) = info.message() {
let mut string = crate::std::String::with_capacity(args.estimated_capacity());
string.write_fmt(*args).unwrap_or_default();
string
} else {
crate::std::String::new()
};
let message = crate::std::String::from(info.message().as_str().unwrap_or_default());

as_abort(message, crate::std::String::from(file), line, col)
}
Expand Down

0 comments on commit 8f086a7

Please sign in to comment.