Skip to content

Commit

Permalink
feat: use tracing if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
indietyp committed Sep 21, 2024
1 parent ed109a2 commit 6a1ca3f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/error-stack/src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ impl Drop for Bomb {

match self.0 {
BombState::Panic => panic!("ReportSink was dropped without being consumed"),
#[cfg(feature = "tracing")]

Check warning

Code scanning / clippy

unexpected cfg condition value: tracing Warning

unexpected cfg condition value: tracing
BombState::Warn => {
tracing::warn!("ReportSink was dropped without being consumed");
}
#[cfg(not(feature = "tracing"))]

Check warning

Code scanning / clippy

unexpected cfg condition value: tracing Warning

unexpected cfg condition value: tracing
#[allow(clippy::print_stderr)]
BombState::Warn => {
#[cfg(not(target_arch = "wasm32"))]
eprintln!("ReportSink was dropped without being consumed");
}
BombState::Defused => {}
Expand Down

0 comments on commit 6a1ca3f

Please sign in to comment.