Skip to content

Commit ea87357

Browse files
committed
Fix many clippy warnings
This is because the tracing-attributes update made clippy look at those again. I've removed the `too_many_lines` lint, as it's not really useful and we ignore it most of the time anyway.
1 parent dae946f commit ea87357

File tree

39 files changed

+55
-55
lines changed

39 files changed

+55
-55
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ all = { level = "deny", priority = -1 }
2626
pedantic = { level = "warn", priority = -1 }
2727

2828
str_to_string = "deny"
29+
too_many_lines = "allow"
2930

3031
[workspace.lints.rustdoc]
3132
broken_intra_doc_links = "deny"

crates/axum-utils/src/client_authorization.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ where
368368
{
369369
type Rejection = ClientAuthorizationError;
370370

371-
#[allow(clippy::too_many_lines)]
372371
async fn from_request(
373372
req: Request<axum::body::Body>,
374373
state: &S,

crates/cli/src/commands/doctor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const DOCS_BASE: &str = "https://element-hq.github.io/matrix-authentication-serv
2626
pub(super) struct Options {}
2727

2828
impl Options {
29-
#[allow(clippy::too_many_lines)]
3029
pub async fn run(self, figment: &Figment) -> anyhow::Result<ExitCode> {
3130
let _span = info_span!("cli.doctor").entered();
3231
info!(

crates/cli/src/commands/manage.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ enum Subcommand {
207207
}
208208

209209
impl Options {
210-
#[allow(clippy::too_many_lines)]
211210
pub async fn run(self, figment: &Figment) -> anyhow::Result<ExitCode> {
212211
use Subcommand as SC;
213212
let clock = SystemClock::default();

crates/cli/src/commands/server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ pub(super) struct Options {
5555
}
5656

5757
impl Options {
58-
#[allow(clippy::too_many_lines)]
5958
pub async fn run(self, figment: &Figment) -> anyhow::Result<ExitCode> {
6059
let span = info_span!("cli.run.init").entered();
6160
let mut shutdown = LifecycleManager::new()?;

crates/cli/src/commands/syn2mas.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ const NUM_WRITER_CONNECTIONS: usize = 8;
8888

8989
impl Options {
9090
#[tracing::instrument("cli.syn2mas.run", skip_all)]
91-
#[allow(clippy::too_many_lines)]
9291
pub async fn run(self, figment: &Figment) -> anyhow::Result<ExitCode> {
9392
if self.synapse_configuration_files.is_empty() {
9493
error!("Please specify the path to the Synapse configuration file(s).");

crates/cli/src/server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ async fn log_response_middleware(
205205
response
206206
}
207207

208-
#[allow(clippy::too_many_lines)]
209208
pub fn build_router(
210209
state: AppState,
211210
resources: &[HttpResource],

crates/cli/src/telemetry/tokio.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use tokio::runtime::RuntimeMetrics;
99
use super::METER;
1010

1111
/// Install metrics for the tokio runtime.
12-
#[allow(clippy::too_many_lines)]
1312
pub fn observe(metrics: RuntimeMetrics) {
1413
{
1514
let metrics = metrics.clone();

crates/config/src/sections/secrets.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ impl ConfigurationSection for SecretsConfig {
303303
}
304304

305305
impl SecretsConfig {
306+
#[expect(clippy::similar_names, reason = "Key type names are very similar")]
306307
#[tracing::instrument(skip_all)]
307308
pub(crate) async fn generate<R>(mut rng: R) -> anyhow::Result<Self>
308309
where

crates/handlers/src/admin/v1/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ mod user_registration_tokens;
2727
mod user_sessions;
2828
mod users;
2929

30-
#[allow(clippy::too_many_lines)]
3130
pub fn router<S>() -> ApiRouter<S>
3231
where
3332
S: Clone + Send + Sync + 'static,

0 commit comments

Comments
 (0)