mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 09:13:02 +03:00
api::core::ciphers::put_cipher_share_selected does not use cipher_ids #636
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?
Originally created by @zacknewman on GitHub.
This may not be a bug, but it could be if
cipher_idsis actually important. Anyway,cipher_idsinapi::core::ciphers::put_cipher_share_selectedis never read from. Is this accidental? What's the point ofpushing IDs into it without ever reading the IDs?Possible fix if that variable is unimportant:
@BlackDex commented on GitHub:
Looks like a leftover indeed. I'll check it out further but i think you are right.
@BlackDex commented on GitHub:
btw strange that clippy doesn't find this. It should see that it's never read after written.
@zacknewman commented on GitHub:
clippy::nursery (https://rust-lang.github.io/rust-clippy/master/index.html#/collection_is_never_read?groups=nursery) contains the necessary lint. On my personal fork of Vaultwarden, I deny all lints and allow specific lints (e.g., implicit_return), and it has helped me clean up some stuff including detecting the &mut DbConn I mentioned earlier.
#![deny(unsafe_code, unused, warnings, clippy::all, clippy::cargo, clippy::complexity, clippy::correctness, clippy::nursery, clippy::pedantic, clippy::perf, clippy::restriction, clippy::style, clippy::suspicious)]