clippy: remove unnecessary clones
and from::<T>(T) Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
@ -46,7 +46,7 @@ fn list_roles() -> Result<Value, Error> {
|
||||
let mut priv_list = Vec::new();
|
||||
for (name, privilege) in PRIVILEGES.iter() {
|
||||
if privs & privilege > 0 {
|
||||
priv_list.push(name.clone());
|
||||
priv_list.push(name);
|
||||
}
|
||||
}
|
||||
list.push(json!({ "roleid": role, "privs": priv_list, "comment": comment }));
|
||||
|
@ -603,7 +603,7 @@ pub fn generate_token(
|
||||
token_shadow::set_secret(&tokenid, &secret)?;
|
||||
|
||||
let token = user::ApiToken {
|
||||
tokenid: tokenid.clone(),
|
||||
tokenid,
|
||||
comment,
|
||||
enable,
|
||||
expire,
|
||||
|
Reference in New Issue
Block a user