From c01c7744c7567378ec219adcb5f14891bbe087b1 Mon Sep 17 00:00:00 2001 From: Simon Broeng Jensen Date: Sat, 25 Jan 2025 13:45:22 +0100 Subject: [PATCH] server: fix a couple of clippy warnings --- server/src/infra/ldap_handler.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/infra/ldap_handler.rs b/server/src/infra/ldap_handler.rs index 7da24e7..7257c31 100644 --- a/server/src/infra/ldap_handler.rs +++ b/server/src/infra/ldap_handler.rs @@ -432,7 +432,10 @@ impl LdapHandler LdapResult<()> { - if change.modification.atype.to_ascii_lowercase() != "userpassword" + if !change + .modification + .atype + .eq_ignore_ascii_case("userpassword") || change.operation != LdapModifyType::Replace { return Err(LdapError { @@ -530,7 +533,7 @@ impl LdapHandler LdapResult> { if request.base.is_empty() && request.scope == LdapSearchScope::Base { if let LdapFilter::Present(attribute) = &request.filter { - if attribute.to_ascii_lowercase() == "objectclass" { + if attribute.eq_ignore_ascii_case("objectclass") { debug!("rootDSE request"); return Ok(vec![ root_dse_response(&self.ldap_info.base_dn_str), @@ -563,7 +566,7 @@ impl LdapHandler