]> git.proxmox.com Git - proxmox-backup.git/commit
replace get(key).is_none() with !contains_key()
authorMaximiliano Sandoval <m.sandoval@proxmox.com>
Wed, 26 Jun 2024 13:05:59 +0000 (15:05 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 28 Jun 2024 07:20:59 +0000 (09:20 +0200)
commit1d836ed32ac771c4badf474d869b61ec61e3372f
treeb45fe8584d71496e1ab64628ae52e43229c885f3
parentf3f3c672670bbc0e55475e209968ec59ee034f37
replace get(key).is_none() with !contains_key()

Fixes the clippy warning:

warning: unnecessary use of `get(&user2).is_none()`
    --> pbs-config/src/acl.rs:1067:36
     |
1067 |                 assert!(node.users.get(&user2).is_none());
     |                         -----------^^^^^^^^^^^^^^^^^^^^^
     |                         |
     |                         help: replace it with: `!node.users.contains_key(&user2)`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
pbs-config/src/acl.rs
pbs-config/src/network/parser.rs
pbs-config/src/user.rs
src/api2/access/acl.rs
src/api2/tape/drive.rs
src/config/acme/plugin.rs