Skip to content

Commit 7cc5ff7

Browse files
committed
Make tracing optional
1 parent fb142c1 commit 7cc5ff7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async-io = "2.1.0"
2020
cfg-if = "1.0"
2121
event-listener = "5.1.0"
2222
futures-lite = "2.0.0"
23-
tracing = { version = "0.1.40", default-features = false }
23+
tracing = { version = "0.1.40", default-features = false, optional = true }
2424

2525
[target.'cfg(unix)'.dependencies]
2626
async-signal = "0.2.3"

src/reaper/wait.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ impl ChildGuard {
113113

114114
// Wait on this child forever.
115115
let result = future::poll_fn(|cx| inner.poll_wait(cx)).await;
116-
if let Err(e) = result {
117-
tracing::error!("error while polling zombie process: {}", e);
116+
if let Err(_e) = result {
117+
#[cfg(feature = "tracing")]
118+
tracing::error!("error while polling zombie process: {}", _e);
118119
}
119120
}
120121
};

0 commit comments

Comments
 (0)