mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-30 06:21:52 +00:00
fix issue with spantrace capture in last release (#28)
This commit is contained in:
parent
63b8bc71e0
commit
69db885ecc
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "color-eyre"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
authors = ["Jane Lusby <jlusby@yaah.dev>"]
|
||||
edition = "2018"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
14
src/lib.rs
14
src/lib.rs
@ -199,7 +199,7 @@
|
||||
//! [`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/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))]
|
||||
#![warn(
|
||||
missing_debug_implementations,
|
||||
@ -376,7 +376,7 @@ impl eyre::EyreHandler for Handler {
|
||||
};
|
||||
|
||||
#[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())
|
||||
} else {
|
||||
None
|
||||
@ -399,12 +399,12 @@ impl eyre::EyreHandler for Handler {
|
||||
return core::fmt::Debug::fmt(error, f);
|
||||
}
|
||||
|
||||
// #[cfg(feature = "capture-spantrace")]
|
||||
// let errors = Chain::new(error)
|
||||
// .filter(|e| e.span_trace().is_none())
|
||||
// .enumerate();
|
||||
#[cfg(feature = "capture-spantrace")]
|
||||
let errors = eyre::Chain::new(error)
|
||||
.filter(|e| e.span_trace().is_none())
|
||||
.enumerate();
|
||||
|
||||
// #[cfg(not(feature = "capture-spantrace"))]
|
||||
#[cfg(not(feature = "capture-spantrace"))]
|
||||
let errors = eyre::Chain::new(error).enumerate();
|
||||
|
||||
let mut buf = String::new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user