[pbs-devel] [PATCH proxmox 04/18] remove unnecesary pub(self)
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Jun 26 12:45:00 CEST 2024
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 <m.sandoval at proxmox.com>
---
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<Vec<u8>, Error> {
+ fn sign(&self, digest: MessageDigest, data: &[u8]) -> Result<Vec<u8>, 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<Box<dyn UserChallengeAccess>, Error> {
@@ -1265,7 +1265,7 @@ impl TfaChallenge {
}
}
-pub(self) fn bool_is_false(v: &bool) -> bool {
+fn bool_is_false(v: &bool) -> bool {
!v
}
--
2.39.2
More information about the pbs-devel
mailing list