Skip to content

Commit

Permalink
chore: Fix cargo deny warnings (#1374)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco authored Apr 24, 2023
1 parent 4942dd4 commit c09fc23
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 20 deletions.
1 change: 0 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ allow = [
"OpenSSL",
"Zlib",
"Unicode-DFS-2016",
"MPL-2.0",
]

[[licenses.clarify]]
Expand Down
2 changes: 1 addition & 1 deletion interop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tonic = {path = "../tonic", features = ["tls"]}
tower = {version = "0.4"}
tracing = "0.1"
tracing-log = "0.1"
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
tracing-subscriber = {version = "0.3"}

[build-dependencies]
tonic-build = {path = "../tonic-build", features = ["prost"]}
Expand Down
7 changes: 1 addition & 6 deletions interop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ pub mod pb {
use std::{default, fmt, iter};

pub fn trace_init() {
let sub = tracing_subscriber::FmtSubscriber::builder()
.with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env())
.finish();

let _ = tracing::subscriber::set_global_default(sub);
let _ = tracing_log::LogTracer::init();
tracing_subscriber::fmt::init();
}

pub fn client_payload(size: usize) -> pb::Payload {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ futures-util = "0.3"
prost = "0.11"
tokio = {version = "1.0", features = ["macros", "rt-multi-thread", "net"]}
tonic = {path = "../../tonic"}
tracing-subscriber = {version = "0.3", features = ["env-filter"]}
tracing-subscriber = {version = "0.3"}

[dev-dependencies]
async-stream = "0.3"
Expand Down
4 changes: 1 addition & 3 deletions tests/integration_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,5 @@ pub mod mock {
}

pub fn trace_init() {
let _ = tracing_subscriber::FmtSubscriber::builder()
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.try_init();
tracing_subscriber::fmt::init();
}
10 changes: 2 additions & 8 deletions tests/integration_tests/tests/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ type Stream<T> =

#[tokio::test]
async fn status_from_server_stream() {
trace_init();
integration_tests::trace_init();

struct Svc;

Expand Down Expand Up @@ -178,7 +178,7 @@ async fn status_from_server_stream() {

#[tokio::test]
async fn status_from_server_stream_with_source() {
trace_init();
integration_tests::trace_init();

let channel = Endpoint::try_from("http://[::]:50051")
.unwrap()
Expand All @@ -193,9 +193,3 @@ async fn status_from_server_stream_with_source() {
let source = error.source().unwrap();
source.downcast_ref::<tonic::transport::Error>().unwrap();
}

fn trace_init() {
let _ = tracing_subscriber::FmtSubscriber::builder()
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.try_init();
}

0 comments on commit c09fc23

Please sign in to comment.