Skip to content

Commit d359fab

Browse files
author
Stephan Dilly
committed
clippy fixes
1 parent 48f9331 commit d359fab

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

filetreelist/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl TreeItemInfo {
6363
.unwrap_or_default(),
6464
)
6565
},
66-
|folding| folding.as_path(),
66+
PathBuf::as_path,
6767
)
6868
}
6969

src/components/externaleditor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl ExternalEditorComponent {
104104
let remainder = remainder_str.split_whitespace();
105105

106106
let mut args: Vec<&OsStr> =
107-
remainder.map(|s| OsStr::new(s)).collect();
107+
remainder.map(OsStr::new).collect();
108108

109109
args.push(path.as_os_str());
110110

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ fn draw<B: Backend>(
229229
terminal.resize(terminal.size()?)?;
230230
}
231231

232-
terminal.draw(|mut f| {
233-
if let Err(e) = app.draw(&mut f) {
232+
terminal.draw(|f| {
233+
if let Err(e) = app.draw(f) {
234234
log::error!("failed to draw: {:?}", e);
235235
}
236236
})?;

src/tabs/status.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,7 @@ impl Status {
224224
let ids = format!(
225225
"({})",
226226
ids.iter()
227-
.map(|id| sync::CommitId::get_short_string(
228-
id
229-
))
227+
.map(sync::CommitId::get_short_string)
230228
.join(",")
231229
);
232230

0 commit comments

Comments
 (0)