[Auto] bin/core/tag: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
4d11ad2ac1
commit
8db954c79a
2 changed files with 5 additions and 7 deletions
|
@ -164,7 +164,7 @@ fn alter(rt: &Runtime, path: StoreId, add: Option<Vec<Tag>>, rem: Option<Vec<Tag
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = rt.report_touched(&path).unwrap_or_exit();
|
rt.report_touched(&path).unwrap_or_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn list(path: StoreId, rt: &Runtime) {
|
fn list(path: StoreId, rt: &Runtime) {
|
||||||
|
@ -193,7 +193,7 @@ fn list(path: StoreId, rt: &Runtime) {
|
||||||
|
|
||||||
if line_out {
|
if line_out {
|
||||||
for tag in &tags {
|
for tag in &tags {
|
||||||
let _ = writeln!(rt.stdout(), "{}", tag)
|
writeln!(rt.stdout(), "{}", tag)
|
||||||
.to_exit_code()
|
.to_exit_code()
|
||||||
.unwrap_or_exit();
|
.unwrap_or_exit();
|
||||||
}
|
}
|
||||||
|
@ -201,18 +201,18 @@ fn list(path: StoreId, rt: &Runtime) {
|
||||||
|
|
||||||
if sepp_out {
|
if sepp_out {
|
||||||
let sepp = scmd.value_of("sep").unwrap(); // we checked before
|
let sepp = scmd.value_of("sep").unwrap(); // we checked before
|
||||||
let _ = writeln!(rt.stdout(), "{}", tags.join(sepp))
|
writeln!(rt.stdout(), "{}", tags.join(sepp))
|
||||||
.to_exit_code()
|
.to_exit_code()
|
||||||
.unwrap_or_exit();
|
.unwrap_or_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
if comm_out {
|
if comm_out {
|
||||||
let _ = writeln!(rt.stdout(), "{}", tags.join(", "))
|
writeln!(rt.stdout(), "{}", tags.join(", "))
|
||||||
.to_exit_code()
|
.to_exit_code()
|
||||||
.unwrap_or_exit();
|
.unwrap_or_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = rt.report_touched(&path).unwrap_or_exit();
|
rt.report_touched(&path).unwrap_or_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the tags which should be added from the commandline
|
/// Get the tags which should be added from the commandline
|
||||||
|
@ -238,7 +238,6 @@ fn retrieve_tags(m: &ArgMatches, s: &'static str, v: &'static str) -> Option<Vec
|
||||||
})
|
})
|
||||||
.values_of(v)
|
.values_of(v)
|
||||||
.unwrap() // enforced by clap
|
.unwrap() // enforced by clap
|
||||||
.into_iter()
|
|
||||||
.map(String::from)
|
.map(String::from)
|
||||||
.collect())
|
.collect())
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,6 @@ impl IdPathProvider for PathProvider {
|
||||||
fn get_ids(matches: &ArgMatches) -> Result<Option<Vec<StoreId>>> {
|
fn get_ids(matches: &ArgMatches) -> Result<Option<Vec<StoreId>>> {
|
||||||
matches.values_of("id")
|
matches.values_of("id")
|
||||||
.map(|v| v
|
.map(|v| v
|
||||||
.into_iter()
|
|
||||||
.map(PathBuf::from)
|
.map(PathBuf::from)
|
||||||
.map(|pb| pb.into_storeid())
|
.map(|pb| pb.into_storeid())
|
||||||
.collect::<Result<Vec<_>>>()
|
.collect::<Result<Vec<_>>>()
|
||||||
|
|
Loading…
Reference in a new issue