chore: Fix cargo deny warnings (#1374)

This commit is contained in:
Lucio Franco
2023-04-24 13:41:43 -04:00
committed by GitHub
parent 4942dd4a43
commit c09fc23088
6 changed files with 6 additions and 20 deletions
-1
View File
@@ -34,7 +34,6 @@ allow = [
"OpenSSL",
"Zlib",
"Unicode-DFS-2016",
"MPL-2.0",
]
[[licenses.clarify]]
+1 -1
View File
@@ -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"]}
+1 -6
View File
@@ -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 {
+1 -1
View File
@@ -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"
+1 -3
View File
@@ -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();
}
+2 -8
View File
@@ -130,7 +130,7 @@ type Stream<T> =
#[tokio::test]
async fn status_from_server_stream() {
trace_init();
integration_tests::trace_init();
struct Svc;
@@ -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()
@@ -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();
}