mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-31 05:49:23 -05:00
[PR #7199] [CLOSED] Add redundant_else clippy lint #23429
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/7199
Author: @taylortumlin
Created: 5/8/2026
Status: ❌ Closed
Base:
main← Head:feature/lint-redundant-else📝 Commits (1)
def93aeAdd redundant_else clippy lint📊 Changes
7 files changed (+20 additions, -27 deletions)
View changed files
📝
Cargo.toml(+1 -0)📝
src/api/admin.rs(+1 -2)📝
src/api/core/organizations.rs(+5 -6)📝
src/config.rs(+1 -2)📝
src/db/mod.rs(+6 -7)📝
src/db/models/cipher.rs(+2 -4)📝
src/mail.rs(+4 -6)📄 Description
What
Adds
redundant_else = "deny"to the workspace clippy lint list and removes the 8 existingredundant_elseviolations.Why
Continues the pattern of incrementally adopting useful clippy lints (e.g. PRs #7143, #7144 added
ref_optionandduration_suboptimal_units). The lint catcheselseblocks followingifarms that always diverge — they add nesting without adding meaning.Testing
cargo fmt --checkcargo test --features sqlite,mysql,postgresqlcargo clippy --features sqlite,mysql,postgresql -- -D warningsNotes
One non-mechanical edit: in
src/db/mod.rs, clippy's auto-fix left a// Sqlitesection-comment stranded inside the postgresql arm. Moved it to sit above the#[cfg(sqlite)]block where it belongs.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.