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:
		| @ -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, | ||||
|  | ||||
| @ -51,7 +51,7 @@ fn decode_blob( | ||||
|  | ||||
|     if blob.is_encrypted() && key_file.is_some() { | ||||
|         let (key, _created, _fingerprint) = | ||||
|             load_and_decrypt_key(&key_file.unwrap(), &get_encryption_key_password)?; | ||||
|             load_and_decrypt_key(key_file.unwrap(), &get_encryption_key_password)?; | ||||
|         crypt_conf = CryptConfig::new(key)?; | ||||
|         crypt_conf_opt = Some(&crypt_conf); | ||||
|     } | ||||
|  | ||||
| @ -72,7 +72,7 @@ fn recover_index( | ||||
|  | ||||
|     let crypt_conf_opt = if let Some(key_file_path) = key_file_path { | ||||
|         let (key, _created, _fingerprint) = | ||||
|             load_and_decrypt_key(&key_file_path, &get_encryption_key_password)?; | ||||
|             load_and_decrypt_key(key_file_path, &get_encryption_key_password)?; | ||||
|         Some(CryptConfig::new(key)?) | ||||
|     } else { | ||||
|         None | ||||
|  | ||||
		Reference in New Issue
	
	Block a user