From 18dda8106b92965fdfc1e48f7fc63539cc04d6cb Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Wed, 26 Jun 2024 14:43:32 +0200 Subject: [PATCH] remove unnecesary pub(self) Fixes the clippy warning: warning: unnecessary `pub(self)` --> proxmox-tfa/src/api/mod.rs:1268:1 | 1268 | pub(self) fn bool_is_false(v: &bool) -> bool { | ^^^^^^^^^ help: remove it | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self Signed-off-by: Maximiliano Sandoval --- proxmox-auth-api/src/auth_key.rs | 2 +- proxmox-tfa/src/api/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxmox-auth-api/src/auth_key.rs b/proxmox-auth-api/src/auth_key.rs index 733ffba9..3ea4bbd3 100644 --- a/proxmox-auth-api/src/auth_key.rs +++ b/proxmox-auth-api/src/auth_key.rs @@ -86,7 +86,7 @@ impl PrivateKey { PublicKey::from_pem(&self.public_key_to_pem()?) } - pub(self) fn sign(&self, digest: MessageDigest, data: &[u8]) -> Result, Error> { + fn sign(&self, digest: MessageDigest, data: &[u8]) -> Result, Error> { let mut signer = if self.key.id() == Id::ED25519 { // ed25519 does not support signing with digest Signer::new_without_digest(&self.key) diff --git a/proxmox-tfa/src/api/mod.rs b/proxmox-tfa/src/api/mod.rs index 16444f17..1437aa1b 100644 --- a/proxmox-tfa/src/api/mod.rs +++ b/proxmox-tfa/src/api/mod.rs @@ -75,7 +75,7 @@ pub trait OpenUserChallengeData { } } -pub(self) struct NoUserData; +struct NoUserData; impl OpenUserChallengeData for NoUserData { fn open(&self, _userid: &str) -> Result, Error> { @@ -1265,7 +1265,7 @@ impl TfaChallenge { } } -pub(self) fn bool_is_false(v: &bool) -> bool { +fn bool_is_false(v: &bool) -> bool { !v }