tree-wide: fix needless borrows

found and fixed via clippy

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-12-30 12:57:37 +01:00
parent a0c69902c8
commit 9a37bd6c84
104 changed files with 238 additions and 241 deletions

View File

@ -94,7 +94,7 @@ async fn get_child_links(
path: &str,
rpcenv: &mut dyn RpcEnvironment,
) -> Result<Vec<String>, Error> {
let (path, components) = normalize_uri_path(&path)?;
let (path, components) = normalize_uri_path(path)?;
let info = &proxmox_backup::api2::ROUTER
.find_route(&components, &mut HashMap::new())
@ -132,7 +132,7 @@ fn get_api_method(
_ => unreachable!(),
};
let mut uri_param = HashMap::new();
let (path, components) = normalize_uri_path(&path)?;
let (path, components) = normalize_uri_path(path)?;
if let Some(method) =
&proxmox_backup::api2::ROUTER.find_method(&components, method.clone(), &mut uri_param)
{
@ -446,7 +446,7 @@ async fn ls(path: Option<String>, mut param: Value, rpcenv: &mut dyn RpcEnvironm
&mut serde_json::to_value(res)?,
&proxmox_schema::ReturnType {
optional: false,
schema: &LS_SCHEMA,
schema: LS_SCHEMA,
},
&output_format,
&options,