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(), .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 remainder = remainder_str.split_whitespace();
let mut args: Vec<&OsStr> = let mut args: Vec<&OsStr> =
remainder.map(|s| OsStr::new(s)).collect(); remainder.map(OsStr::new).collect();
args.push(path.as_os_str()); args.push(path.as_os_str());

View file

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

View file

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