fix: no-default-features test

This commit is contained in:
Tei Roberts 2023-11-08 00:29:49 +01:00
parent eedde5137f
commit 2629d614a8
3 changed files with 18 additions and 13 deletions

View File

@ -4,7 +4,6 @@ use crate::{
section::PanicMessage, section::PanicMessage,
writers::{EnvSection, WriterExt}, writers::{EnvSection, WriterExt},
}; };
use eyre::WrapErr;
use fmt::Display; use fmt::Display;
use indenter::{indented, Format}; use indenter::{indented, Format};
use owo_colors::{style, OwoColorize, Style}; use owo_colors::{style, OwoColorize, Style};
@ -760,7 +759,7 @@ impl HookBuilder {
}; };
#[cfg(feature = "capture-spantrace")] #[cfg(feature = "capture-spantrace")]
color_spantrace::set_theme(self.theme.into()).wrap_err("could not set the provided `Theme` via `color_spantrace::set_theme` globally as another was already set")?; eyre::WrapErr::wrap_err(color_spantrace::set_theme(self.theme.into()), "could not set the provided `Theme` via `color_spantrace::set_theme` globally as another was already set")?;
Ok((panic_hook, eyre_hook)) Ok((panic_hook, eyre_hook))
} }

View File

@ -36,7 +36,11 @@ Error:
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133
20: test::run_test_in_process::h15b6b7d5919893aa 20: test::run_test_in_process::h15b6b7d5919893aa
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs:608 at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/test/src/lib.rs:608
 ⋮ 15 frames hidden ⋮  21: test::run_test::{{closure}}::h8ef02d13d4506b7f
at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/test/src/lib.rs:572
22: test::run_test::{{closure}}::hcd7b423365d0ff7e
at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/test/src/lib.rs:600
 ⋮ 13 frames hidden ⋮ 
Note: note Note: note
Warning: warning Warning: warning

View File

@ -1,18 +1,20 @@
Finished dev [unoptimized + debuginfo] target(s) in 0.02s Finished dev [unoptimized + debuginfo] target(s) in 0.03s
warning: the following packages contain code that will be rejected by a future version of Rust: nom v4.2.3
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
Running `target/debug/examples/theme_test_helper` Running `target/debug/examples/theme_test_helper`
The application panicked (crashed). The application panicked (crashed).
Message: <non string panic payload> Message: <non string panic payload>
Location: examples/theme_test_helper.rs:37 Location: examples/theme_test_helper.rs:37
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ⋮ 6 frames hidden ⋮   ⋮ 7 frames hidden ⋮ 
7: std::panic::panic_any::hb5351c0843c6c4aa 8: std::panic::panic_any::h696507828cece708
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:57 at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/std/src/panic.rs:63
8: theme_test_helper::main::h22b568e997946766 9: theme_test_helper::main::h8b0946db6f62a6fa
at /home/jlusby/git/yaahc/color-eyre/examples/theme_test_helper.rs:37 at /home/tei/dev/rust/color-eyre/examples/theme_test_helper.rs:37
9: core::ops::function::FnOnce::call_once::hab7662216a7cf3dc 10: core::ops::function::FnOnce::call_once::h6e047342a35216be
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227 at /rustc/7b4d9e155fec06583c763f176fc432dc779f1fc6/library/core/src/ops/function.rs:250
 ⋮ 15 frames hidden ⋮   ⋮ 16 frames hidden ⋮ 
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets. Run with RUST_BACKTRACE=full to include source snippets.