remove mem::forget and replace with _guard

This commit is contained in:
Byron Hambly 2023-12-14 20:46:52 +02:00
parent 9688082c70
commit b23f6c1b30
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697

View file

@ -13,9 +13,7 @@ pub fn init(debug: bool, json: bool, dir: impl AsRef<Path>) -> Result<()> {
let registry = Registry::default().with(level_filter);
let appender = tracing_appender::rolling::never(dir.as_ref(), "swap-all.log");
let (appender, guard) = tracing_appender::non_blocking(appender);
std::mem::forget(guard);
let (appender, _guard) = tracing_appender::non_blocking(appender);
let file_logger = registry.with(
fmt::layer()