fix issue with spantrace capture in last release (#28)

This commit is contained in:
Jane Lusby 2020-06-21 13:22:38 -07:00 committed by GitHub
parent 63b8bc71e0
commit 69db885ecc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "color-eyre" name = "color-eyre"
version = "0.4.0" version = "0.4.1"
authors = ["Jane Lusby <jlusby@yaah.dev>"] authors = ["Jane Lusby <jlusby@yaah.dev>"]
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"

View File

@ -199,7 +199,7 @@
//! [`examples/custom_filter.rs`]: https://github.com/yaahc/color-eyre/blob/master/examples/custom_filter.rs //! [`examples/custom_filter.rs`]: https://github.com/yaahc/color-eyre/blob/master/examples/custom_filter.rs
//! [`examples/custom_section.rs`]: https://github.com/yaahc/color-eyre/blob/master/examples/custom_section.rs //! [`examples/custom_section.rs`]: https://github.com/yaahc/color-eyre/blob/master/examples/custom_section.rs
//! [`examples/multiple_errors.rs`]: https://github.com/yaahc/color-eyre/blob/master/examples/multiple_errors.rs //! [`examples/multiple_errors.rs`]: https://github.com/yaahc/color-eyre/blob/master/examples/multiple_errors.rs
#![doc(html_root_url = "https://docs.rs/color-eyre/0.4.0")] #![doc(html_root_url = "https://docs.rs/color-eyre/0.4.1")]
#![cfg_attr(docsrs, feature(doc_cfg))] #![cfg_attr(docsrs, feature(doc_cfg))]
#![warn( #![warn(
missing_debug_implementations, missing_debug_implementations,
@ -376,7 +376,7 @@ impl eyre::EyreHandler for Handler {
}; };
#[cfg(feature = "capture-spantrace")] #[cfg(feature = "capture-spantrace")]
let span_trace = if dbg!(get_deepest_spantrace(error)).is_none() { let span_trace = if get_deepest_spantrace(error).is_none() {
Some(SpanTrace::capture()) Some(SpanTrace::capture())
} else { } else {
None None
@ -399,12 +399,12 @@ impl eyre::EyreHandler for Handler {
return core::fmt::Debug::fmt(error, f); return core::fmt::Debug::fmt(error, f);
} }
// #[cfg(feature = "capture-spantrace")] #[cfg(feature = "capture-spantrace")]
// let errors = Chain::new(error) let errors = eyre::Chain::new(error)
// .filter(|e| e.span_trace().is_none()) .filter(|e| e.span_trace().is_none())
// .enumerate(); .enumerate();
// #[cfg(not(feature = "capture-spantrace"))] #[cfg(not(feature = "capture-spantrace"))]
let errors = eyre::Chain::new(error).enumerate(); let errors = eyre::Chain::new(error).enumerate();
let mut buf = String::new(); let mut buf = String::new();