acl: directly return struct rather than a binding
Fixes the following clippy warning: warning: returning the result of a `let` binding from a block --> proxmox-access-control/src/acl.rs:687:13 | 686 | let config = TestAcmConfig { roles }; | ------------------------------------- unnecessary `let` binding 687 | config | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 686 ~ 687 ~ TestAcmConfig { roles } | Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
a4b57d6c3c
commit
229cc6ae02
@ -683,8 +683,7 @@ mod test {
|
||||
roles.insert("DatastoreBackup", 4);
|
||||
roles.insert("DatastoreReader", 8);
|
||||
|
||||
let config = TestAcmConfig { roles };
|
||||
config
|
||||
TestAcmConfig { roles }
|
||||
});
|
||||
|
||||
// ignore errors here, we don't care if it's initialized already
|
||||
|
Loading…
Reference in New Issue
Block a user