clippy: more misc fixes

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-01-25 14:43:00 +01:00
committed by Wolfgang Bumiller
parent 367c0ff7c6
commit 4d104cd4d8
5 changed files with 12 additions and 28 deletions

View File

@ -345,7 +345,7 @@ fn unmap(
let mut any = false;
for (backing, loopdev) in tools::fuse_loop::find_all_mappings()? {
let name = tools::systemd::unescape_unit(&backing)?;
println!("{}:\t{}", loopdev.unwrap_or("(unmapped)".to_owned()), name);
println!("{}:\t{}", loopdev.unwrap_or_else(|| "(unmapped)".to_string()), name);
any = true;
}
if !any {