refactor: apply clippy let-chains and harden password validation

- Auto-fix 29 clippy warnings by converting nested if-lets to let-chains
- Harden password strength validator to reject restricted substrings
- Simplify rate_limiter state checks using is_none_or
- Improves idiomatic Rust style and overall security posture
This commit is contained in:
thakares committed 2026-08-07 19:48:25 +05:30
1 parent f2f615b456
commit b25a015898
17 files changed
+81 -109

No files matched your search

+1 -3
View File
@@ -324,11 +324,9 @@ pub async fn update(
.find_by_slug(slug)
.await
.map_err(AppError::Database)?
{
if other.entity_id != id || other.entity_type != "application" {
&& (other.entity_id != id || other.entity_type != "application") {
return Err(AppError::Conflict(format!("slug '{slug}' already exists")));
}
}
let redirect_json = redirect_uris.map(|v| serde_json::to_string(&v).unwrap_or_default());
let scopes_json = scopes.map(|v| serde_json::to_string(&v).unwrap_or_default());