mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-08 05:54:41 -05:00
[PR #1546] [MERGED] Run Clippy #2834
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/1546
Author: @RealOrangeOne
Created: 3/27/2021
Status: ✅ Merged
Merged: 3/28/2021
Merged by: @dani-garcia
Base:
master← Head:clippy-run📝 Commits (10+)
ea57dc3Usematchesmacroa8138beUseif letmore9f1240dOnly construct JSON object if it's useful6b1daebImplementFromoverInto49af9cfCorrectly camelCase acronyms47c2625Preventclippycomplaining at method3e5971bRemove unnecessary result return types828a060Run clippy on CIda55d5eAlso run actions CI on pull request0bf0125Reverse negation on ordering📊 Changes
18 files changed (+177 additions, -168 deletions)
View changed files
📝
.github/workflows/build.yml(+20 -1)📝
src/api/admin.rs(+8 -8)📝
src/api/core/accounts.rs(+8 -9)📝
src/api/core/ciphers.rs(+7 -7)📝
src/api/core/folders.rs(+3 -3)📝
src/api/core/mod.rs(+11 -10)📝
src/api/core/organizations.rs(+25 -25)📝
src/api/core/two_factor/mod.rs(+3 -3)📝
src/api/core/two_factor/u2f.rs(+5 -5)📝
src/api/icons.rs(+7 -5)📝
src/api/notifications.rs(+22 -20)📝
src/auth.rs(+33 -33)📝
src/db/models/cipher.rs(+1 -1)📝
src/db/models/device.rs(+3 -3)📝
src/db/models/organization.rs(+4 -16)📝
src/error.rs(+5 -4)📝
src/main.rs(+4 -7)📝
src/util.rs(+8 -8)📄 Description
Run
clippyover the codebase, and fix the issueshttps://github.com/rust-lang/rust-clippy
The diff is large, but the code is now nice and rust-y, and fixes some
unwraps, unnecessary code and cleaner conditionals.I intend to also do a PR for
cargo fmt, but best get this one in first so it's easier to review.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.