Change disabled and unsupported backtraces to print using placeholder style

This commit is contained in:
David Tolnay 2020-02-13 00:12:26 -08:00
parent db75b6a91f
commit 1f1ca877b7
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -162,8 +162,8 @@ enum BytesOrWide {
impl fmt::Debug for Backtrace {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut capture = match &self.inner {
Inner::Unsupported => return fmt.write_str("unsupported backtrace"),
Inner::Disabled => return fmt.write_str("disabled backtrace"),
Inner::Unsupported => return fmt.write_str("<unsupported>"),
Inner::Disabled => return fmt.write_str("<disabled>"),
Inner::Captured(c) => c.lock().unwrap(),
};
capture.resolve();