From e0c0d51a05c90b524428b3e6876bb2e38aa5457c Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Sat, 27 Apr 2024 15:16:41 -0700 Subject: [PATCH] fix lints --- Cargo.toml | 4 ---- src/main.rs | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3266dd68..ba953a29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/main.rs b/src/main.rs index 71651c4d..3bf77fa1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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>>; +type TracingFlameGuard = Option>>; #[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();