From e67b2ac11050e2ef9bf9354f42312aaf8df5f142 Mon Sep 17 00:00:00 2001 From: David Onuh Date: Sun, 2 Jun 2024 11:30:37 +0100 Subject: [PATCH] clippy cleanup --- ahnlich/server/src/lib.rs | 2 +- ahnlich/tracer/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ahnlich/server/src/lib.rs b/ahnlich/server/src/lib.rs index c371b6ad..1244001e 100644 --- a/ahnlich/server/src/lib.rs +++ b/ahnlich/server/src/lib.rs @@ -17,7 +17,7 @@ pub async fn run_server(config: ServerConfig) -> std::io::Result<()> { .otel_endpoint .unwrap_or("http://127.0.0.1:4317".to_string()); let log_level = &config.log_level; - init_tracing("ahnlich-db", Some(log_level), &otel_url); + init_tracing("ahnlich-db", Some(log_level), otel_url); } let listener = diff --git a/ahnlich/tracer/src/lib.rs b/ahnlich/tracer/src/lib.rs index 3ad70cf1..4e5163d0 100644 --- a/ahnlich/tracer/src/lib.rs +++ b/ahnlich/tracer/src/lib.rs @@ -5,10 +5,10 @@ use opentelemetry_sdk::{ Resource, }; use tracing::subscriber::set_global_default; -use tracing_subscriber::{layer::SubscriberExt, prelude::*, EnvFilter, Registry}; +use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry}; pub fn init_tracing(service_name: &'static str, log_level: Option<&str>, otel_url: &str) { - let env_filter = EnvFilter::new(log_level.unwrap_or_else(|| "info")); + let env_filter = EnvFilter::new(log_level.unwrap_or("info")); //let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); let otel_layer = tracing_opentelemetry::layer().with_tracer(