Apply ref_option lint findings#7143
Merged
BlackDex merged 1 commit intodani-garcia:mainfrom Apr 28, 2026
Merged
Conversation
Quote from the lint description: "More flexibility, better memory optimization, and more idiomatic Rust code. &Option<T> 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<T> in order to return it. At a lower level, &Option<T> 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."
pieska
pushed a commit
to pieska/vaultwarden
that referenced
this pull request
May 3, 2026
Quote from the lint description: "More flexibility, better memory optimization, and more idiomatic Rust code. &Option<T> 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<T> in order to return it. At a lower level, &Option<T> 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."
dadezzz
pushed a commit
to dadezzz/infra_docker-compose
that referenced
this pull request
May 4, 2026
…(#243) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/vaultwarden/server](https://github.com/dani-garcia/vaultwarden) | minor | `1.35.8` → `1.36.0` | --- ### Release Notes <details> <summary>dani-garcia/vaultwarden (quay.io/vaultwarden/server)</summary> ### [`v1.36.0`](https://github.com/dani-garcia/vaultwarden/releases/tag/1.36.0) [Compare Source](dani-garcia/vaultwarden@1.35.8...1.36.0) #### Security Fixes This release contains security fixes for the following advisories. We strongly advice to update as soon as possible. - SSO Login CSRF [GHSA-pfp2-jhgq-6hg5](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-pfp2-jhgq-6hg5) [GHSA-w6h6-8r66-hcv7](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-w6h6-8r66-hcv7) - User/Organization Enumeration [GHSA-hxqh-ff5p-wfr3](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-hxqh-ff5p-wfr3) - SSO existing-user binding [GHSA-j4j8-gpvj-7fqr](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-j4j8-gpvj-7fqr) [GHSA-6x5c-84vm-5j56](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-6x5c-84vm-5j56) - SSRF via Icon Endpoint [GHSA-72vh-x5jq-m82g](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-72vh-x5jq-m82g) - Some crate's updated and other minor security enhancements These are private for now, pending CVE assignment. #### Notes - Archiving of items is available <https://bitwarden.com/blog/keep-your-vault-tidy-with-item-archiving/> <https://bitwarden.com/nl-nl/help/managing-items/#archive> - Web Vault updated to v2026.4.1 #### What's Changed - SSO fallback to UserInfo preferred\_username by [@​Timshel](https://github.com/Timshel) in [#​7128](dani-garcia/vaultwarden#7128) - Dummy identifier need to pass for a guid by [@​Timshel](https://github.com/Timshel) in [#​7154](dani-garcia/vaultwarden#7154) - add new /identity/accounts/prelogin/password by [@​stefan0xC](https://github.com/stefan0xC) in [#​7156](dani-garcia/vaultwarden#7156) - Add DuckDuckGo browser device type by [@​dfunkt](https://github.com/dfunkt) in [#​7147](dani-garcia/vaultwarden#7147) - Apply `duration_suboptimal_units` lint findings by [@​dfunkt](https://github.com/dfunkt) in [#​7144](dani-garcia/vaultwarden#7144) - Apply `ref_option` lint findings by [@​dfunkt](https://github.com/dfunkt) in [#​7143](dani-garcia/vaultwarden#7143) - Fix hardcoded sso identifier by [@​Timshel](https://github.com/Timshel) in [#​7157](dani-garcia/vaultwarden#7157) - Update crates and fix a nightly lint by [@​BlackDex](https://github.com/BlackDex) in [#​7161](dani-garcia/vaultwarden#7161) - Fix Host/IP resolving by [@​BlackDex](https://github.com/BlackDex) in [#​7162](dani-garcia/vaultwarden#7162) - Several SSO Fixes by [@​BlackDex](https://github.com/BlackDex) in [#​7163](dani-garcia/vaultwarden#7163) - Add support for archiving items by [@​matt-aaron](https://github.com/matt-aaron) in [#​6916](dani-garcia/vaultwarden#6916) - Fix favicon fetching to check all icon links instead of just the first one by [@​Shocker](https://github.com/Shocker) in [#​6880](dani-garcia/vaultwarden#6880) - Fix merge conflict by [@​dani-garcia](https://github.com/dani-garcia) in [#​7164](dani-garcia/vaultwarden#7164) - Replace organization\_uuid unwrap with proper error handling by [@​xjohnyknox](https://github.com/xjohnyknox) in [#​6936](dani-garcia/vaultwarden#6936) - fix: return Err instead of panic on unknown cipher atype in to\_json() by [@​mango766](https://github.com/mango766) in [#​7068](dani-garcia/vaultwarden#7068) - Allow SQLite to be linked against dynamically by [@​ISSOtm](https://github.com/ISSOtm) in [#​7057](dani-garcia/vaultwarden#7057) - Update crates and web-vault by [@​BlackDex](https://github.com/BlackDex) in [#​7171](dani-garcia/vaultwarden#7171) - Update hickory by [@​BlackDex](https://github.com/BlackDex) in [#​7175](dani-garcia/vaultwarden#7175) #### New Contributors - [@​matt-aaron](https://github.com/matt-aaron) made their first contribution in [#​6916](dani-garcia/vaultwarden#6916) - [@​Shocker](https://github.com/Shocker) made their first contribution in [#​6880](dani-garcia/vaultwarden#6880) - [@​xjohnyknox](https://github.com/xjohnyknox) made their first contribution in [#​6936](dani-garcia/vaultwarden#6936) - [@​mango766](https://github.com/mango766) made their first contribution in [#​7068](dani-garcia/vaultwarden#7068) - [@​ISSOtm](https://github.com/ISSOtm) made their first contribution in [#​7057](dani-garcia/vaultwarden#7057) **Full Changelog**: <dani-garcia/vaultwarden@1.35.8...1.36.0> You can discuss this release here <dani-garcia/vaultwarden#7177> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuNiIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS42IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
birme
pushed a commit
to eyevinn-osaas/vaultwarden
that referenced
this pull request
May 5, 2026
Quote from the lint description: "More flexibility, better memory optimization, and more idiomatic Rust code. &Option<T> 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<T> in order to return it. At a lower level, &Option<T> 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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."