clippy fixes

This commit is contained in:
Stephan Dilly 2021-09-30 23:30:39 +02:00
parent 48f9331b0d
commit d359fabe7b
4 changed files with 5 additions and 7 deletions

View File

@ -63,7 +63,7 @@ impl TreeItemInfo {
.unwrap_or_default(),
)
},
|folding| folding.as_path(),
PathBuf::as_path,
)
}

View File

@ -104,7 +104,7 @@ impl ExternalEditorComponent {
let remainder = remainder_str.split_whitespace();
let mut args: Vec<&OsStr> =
remainder.map(|s| OsStr::new(s)).collect();
remainder.map(OsStr::new).collect();
args.push(path.as_os_str());

View File

@ -229,8 +229,8 @@ fn draw<B: Backend>(
terminal.resize(terminal.size()?)?;
}
terminal.draw(|mut f| {
if let Err(e) = app.draw(&mut f) {
terminal.draw(|f| {
if let Err(e) = app.draw(f) {
log::error!("failed to draw: {:?}", e);
}
})?;

View File

@ -224,9 +224,7 @@ impl Status {
let ids = format!(
"({})",
ids.iter()
.map(|id| sync::CommitId::get_short_string(
id
))
.map(sync::CommitId::get_short_string)
.join(",")
);