Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bungoboingo committed Nov 30, 2022
1 parent 3f4bb5c commit a9893d4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions profiling/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::thread::current;
use std::time::Duration;
use tracing_subscriber::prelude::*;
use tracing_subscriber::Registry;
Expand All @@ -15,7 +14,7 @@ pub use tracing::{info_span, instrument};
pub struct Profiler {
#[cfg(feature = "tracing-chrome")]
/// [`FlushGuard`] must not be dropped until the application scope is dropped for accurate tracing.
guard: FlushGuard,
_guard: FlushGuard,
}

pub fn init() -> Profiler {
Expand Down Expand Up @@ -45,7 +44,7 @@ pub fn init() -> Profiler {
time
)
})
.unwrap_or("trace.json".to_string());
.unwrap_or_else(|| "trace.json".to_string());

let path = format!(
"{}/{}",
Expand Down Expand Up @@ -96,6 +95,6 @@ pub fn init() -> Profiler {

Profiler {
#[cfg(feature = "tracing-chrome")]
guard,
_guard: guard,
}
}

0 comments on commit a9893d4

Please sign in to comment.