fix lints

This commit is contained in:
Charles Hall 2024-04-27 15:16:41 -07:00 committed by June
parent e4b669360f
commit e0c0d51a05
2 changed files with 3 additions and 6 deletions

View file

@ -525,9 +525,6 @@ single_use_lifetimes = "warn"
unsafe_op_in_unsafe_fn = "warn"
unreachable_pub = "warn"
# not in rust 1.75.0 (doesn't break CI but won't check for it)
unit_bindings = "warn"
# this seems to suggest broken code and is not working correctly
unused_braces = "allow"
@ -577,7 +574,6 @@ filetype_is_file = "warn"
float_cmp_const = "warn"
format_push_string = "warn"
impl_trait_in_params = "warn"
ref_to_mut = "warn"
lossy_float_literal = "warn"
mem_forget = "warn"
missing_assert_message = "warn"

View file

@ -7,7 +7,7 @@ use std::os::unix::fs::PermissionsExt as _; /* not unix specific, just only for
// are not stable as of writing This is the case for every other occurence of
// sync Mutex/RwLock, except for database related ones
use std::sync::{Arc, RwLock};
use std::{any::Any, fs, io, net::SocketAddr, sync::atomic, time::Duration};
use std::{any::Any, io, net::SocketAddr, sync::atomic, time::Duration};
use api::ruma_wrapper::{Ruma, RumaResponse};
use axum::{
@ -576,7 +576,7 @@ impl LogLevelReloadHandles {
}
#[cfg(feature = "perf_measurements")]
type TracingFlameGuard = Option<tracing_flame::FlushGuard<io::BufWriter<fs::File>>>;
type TracingFlameGuard = Option<tracing_flame::FlushGuard<io::BufWriter<std::fs::File>>>;
#[cfg(not(feature = "perf_measurements"))]
type TracingFlameGuard = ();
@ -659,6 +659,7 @@ fn init_tracing(config: &Config) -> (LogLevelReloadHandles, TracingFlameGuard) {
};
#[cfg(not(feature = "perf_measurements"))]
#[cfg_attr(not(feature = "perf_measurements"), allow(clippy::let_unit_value))]
let flame_guard = ();
tracing::subscriber::set_global_default(subscriber).unwrap();