Fix clippy lints
This commit is contained in:
parent
e7326f0af6
commit
161a971d06
1 changed files with 4 additions and 4 deletions
|
|
@ -118,7 +118,7 @@ impl Application for Editor {
|
||||||
String::new(),
|
String::new(),
|
||||||
|mut contents, (i, line)| {
|
|mut contents, (i, line)| {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
contents.push_str("\n");
|
contents.push('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
contents.push_str(&line);
|
contents.push_str(&line);
|
||||||
|
|
@ -127,8 +127,8 @@ impl Application for Editor {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if !contents.ends_with("\n") {
|
if !contents.ends_with('\n') {
|
||||||
contents.push_str("\n");
|
contents.push('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
Command::perform(
|
Command::perform(
|
||||||
|
|
@ -266,7 +266,7 @@ async fn save_file(
|
||||||
.ok_or(Error::DialogClosed)?
|
.ok_or(Error::DialogClosed)?
|
||||||
};
|
};
|
||||||
|
|
||||||
let _ = tokio::fs::write(&path, contents)
|
tokio::fs::write(&path, contents)
|
||||||
.await
|
.await
|
||||||
.map_err(|error| Error::IoError(error.kind()))?;
|
.map_err(|error| Error::IoError(error.kind()))?;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue