mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-10-02 15:26:08 +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]
|
[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"
|
||||||
|
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_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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user