Remove redundant clone()

This commit is contained in:
Shotaro Yamada 2019-09-25 10:32:01 +09:00
parent 7e0fa71532
commit 9c45a9e586
14 changed files with 21 additions and 29 deletions

View file

@ -93,7 +93,7 @@ fn main() -> Result<()> {
(true, true) => Err("Invalid flags: -q conflicts with -v")?,
};
let memory_usage = matches.contains("--memory-usage");
let only = matches.value_from_str(["-o", "--only"])?.map(|v: String| v.to_owned());
let only: Option<String> = matches.value_from_str(["-o", "--only"])?;
let path = {
let mut trailing = matches.free()?;
if trailing.len() != 1 {