From d79c31ad651afc75924eec70ca82a5413a78d89b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Mon, 16 Sep 2024 19:03:37 +0200 Subject: [PATCH 1/3] chore: Remove inline `clippy::expect_used` allowances in tests This is done globally with the clippy config now. --- src/config.rs | 1 - tests/e2e.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 8d199f9..7941b4b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -182,7 +182,6 @@ fn validate_zitadel_url(url: Url) -> Result { // RUST_TEST_THREADS=1 cargo test --lib #[cfg(test)] mod tests { - #![allow(clippy::expect_used, clippy::unwrap_used)] use std::{env, fs::File, io::Write, path::PathBuf}; use indoc::indoc; diff --git a/tests/e2e.rs b/tests/e2e.rs index 4fc8df0..37eadae 100644 --- a/tests/e2e.rs +++ b/tests/e2e.rs @@ -1,4 +1,4 @@ -#![allow(clippy::expect_used)] +#![cfg(test)] use std::{collections::HashSet, path::Path, time::Duration}; From b0039bd50bb004898bce21f3f56a7c71257f44ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Mon, 16 Sep 2024 19:04:11 +0200 Subject: [PATCH 2/3] chore: Remove outdated lint `#[allow]`s Seems some slipped past review. --- src/zitadel.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/zitadel.rs b/src/zitadel.rs index a3ddfd8..6157e06 100644 --- a/src/zitadel.rs +++ b/src/zitadel.rs @@ -206,7 +206,6 @@ impl Zitadel { } /// Update a Zitadel user - #[allow(clippy::unused_async, unused_variables)] async fn update_user(&self, old: &ZitadelUser, new: &ZitadelUser) -> Result<()> { if self.feature_flags.is_enabled(FeatureFlag::DryRun) { tracing::info!("Not updating user due to dry run: {:?} -> {:?}", old, new); From 45af7c242d4714fd2323fd532417dbab38cac1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Mon, 16 Sep 2024 19:06:26 +0200 Subject: [PATCH 3/3] chore: Reduce scope of clippy lint We don't actually seem to use the `ZitadelId` for anything, but this will likely change soon, so let's just change the lint scope. --- src/zitadel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zitadel.rs b/src/zitadel.rs index 6157e06..b6b575d 100644 --- a/src/zitadel.rs +++ b/src/zitadel.rs @@ -488,13 +488,13 @@ pub struct ZitadelConfig { /// The different ways to identify a user in Zitadel #[derive(Debug)] -#[allow(dead_code)] pub enum UserId { /// The login name is actually the email address Login(String), /// The nick name is actually the LDAP ID Nick(String), /// The Zitadel ID + #[allow(dead_code)] ZitadelId(String), }