Skip to content

Commit 0c1a50e

Browse files
committed
remove tracing/ctor, as requested
as requested in #184 (comment)
1 parent 4a218ac commit 0c1a50e

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ http-body-util = "0.1.0"
4141
tokio = { version = "1", features = ["macros", "test-util", "signal"] }
4242
tokio-test = "0.4"
4343
pretty_env_logger = "0.5"
44-
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
45-
ctor = "0.2"
4644

4745
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dev-dependencies]
4846
pnet_datalink = "0.35.0"

tests/legacy_client.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,24 +1068,12 @@ fn connection_poisoning() {
10681068
// comments explain the purpose and logic of each section.
10691069

10701070
//XXX: can manually run like this:
1071-
// $ RUST_LOG=hyper=trace cargo test --features="http1,http2,server,client-legacy" --test legacy_client -- test_connection_error_propagation test_incomplete_message_error --nocapture
1072-
// $ RUST_LOG=hyper=trace cargo test --all-features --test legacy_client -- --nocapture
1071+
// $ cargo test --features="http1,http2,server,client-legacy" --test legacy_client -- test_connection_error_propagation test_incomplete_message_error --nocapture
1072+
// $ cargo test --all-features --test legacy_client -- --nocapture
10731073
// $ cargo test --all-features --test legacy_client
1074-
// --nocapture is actually not necessary to see the trace messages.
10751074

10761075
use std::error::Error; // needed for .source() eg. error[E0599]: no method named `source` found for struct `hyper_util::client::legacy::Error` in the current scope
10771076

1078-
#[cfg(test)]
1079-
#[ctor::ctor]
1080-
fn init_tracing() {
1081-
// Initialize a tracing subscriber that logs to stderr with TRACE level.
1082-
// Use EnvFilter to respect RUST_LOG directives (e.g., hyper=trace).
1083-
tracing_subscriber::fmt()
1084-
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
1085-
.with_writer(std::io::stderr)
1086-
.init();
1087-
}
1088-
10891077
// Helper function to debug byte slices by attempting to interpret them as UTF-8.
10901078
// If the bytes are valid UTF-8, they are printed as a string; otherwise, they are
10911079
// printed as a raw byte array. This aids in debugging tokio_test::io::Mock mismatches.

0 commit comments

Comments
 (0)