clippy: use chars / byte string literals

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-01-19 10:38:00 +01:00
parent 3984a5fd77
commit d8d8af9826
5 changed files with 8 additions and 8 deletions

View File

@ -578,7 +578,7 @@ pub fn complete_port_list(arg: &str, _param: &HashMap<String, String>) -> Vec<St
};
let arg = arg.trim();
let prefix = if let Some(idx) = arg.rfind(",") { &arg[..idx+1] } else { "" };
let prefix = if let Some(idx) = arg.rfind(',') { &arg[..idx+1] } else { "" };
ports.iter().map(|port| format!("{}{}", prefix, port)).collect()
}