mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-31 05:49:23 -05:00
[PR #7143] [MERGED] Apply ref_option lint findings
#24763
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/7143
Author: @dfunkt
Created: 4/27/2026
Status: ✅ Merged
Merged: 4/28/2026
Merged by: @BlackDex
Base:
main← Head:ref-option-lint📝 Commits (1)
ad41c45Applyref_optionlint findings📊 Changes
10 files changed (+54 additions, -53 deletions)
View changed files
📝
Cargo.toml(+1 -0)📝
src/api/admin.rs(+1 -1)📝
src/api/core/accounts.rs(+9 -9)📝
src/api/core/ciphers.rs(+7 -7)📝
src/api/core/mod.rs(+1 -1)📝
src/api/core/organizations.rs(+2 -2)📝
src/api/identity.rs(+27 -27)📝
src/api/notifications.rs(+1 -1)📝
src/api/push.rs(+2 -2)📝
src/config.rs(+3 -3)📄 Description
Quote from the lint description:
"More flexibility, better memory optimization, and more idiomatic Rust code.
&Option in a function signature breaks encapsulation because the caller must own T and move it into an Option to call with it. When returned, the owner must internally store it as Option in order to return it. At a lower level, &Option points to memory with the presence bit flag plus the T value, whereas Option<&T> is usually optimized to a single pointer, so it may be more optimal."
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.