file-restore: avoid unnecessary clone

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-04-23 13:22:30 +02:00
parent 6526709d48
commit e045d154e9
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ enum ExtractPath {
fn parse_path(path: String, base64: bool) -> Result<ExtractPath, Error> {
let mut bytes = if base64 {
base64::decode(path.clone())
base64::decode(&path)
.map_err(|err| format_err!("Failed base64-decoding path '{}' - {}", path, err))?
} else {
path.into_bytes()