summaryrefslogtreecommitdiffstats
path: root/examples/editor
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-18 19:08:57 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-18 19:08:57 +0200
commit161a971d065b3254a2f11cb374d2c94c2d67646b (patch)
treeedc7919d5bae4b2c05472b8b63f0a6ac32fafebd /examples/editor
parente7326f0af6f16cf2ff04fbac93bf296a044923f4 (diff)
downloadiced-161a971d065b3254a2f11cb374d2c94c2d67646b.tar.gz
iced-161a971d065b3254a2f11cb374d2c94c2d67646b.tar.bz2
iced-161a971d065b3254a2f11cb374d2c94c2d67646b.zip
Fix `clippy` lints
Diffstat (limited to 'examples/editor')
-rw-r--r--examples/editor/src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/editor/src/main.rs b/examples/editor/src/main.rs
index 09c4b9b5..785dfb3b 100644
--- a/examples/editor/src/main.rs
+++ b/examples/editor/src/main.rs
@@ -118,7 +118,7 @@ impl Application for Editor {
String::new(),
|mut contents, (i, line)| {
if i > 0 {
- contents.push_str("\n");
+ contents.push('\n');
}
contents.push_str(&line);
@@ -127,8 +127,8 @@ impl Application for Editor {
},
);
- if !contents.ends_with("\n") {
- contents.push_str("\n");
+ if !contents.ends_with('\n') {
+ contents.push('\n');
}
Command::perform(
@@ -266,7 +266,7 @@ async fn save_file(
.ok_or(Error::DialogClosed)?
};
- let _ = tokio::fs::write(&path, contents)
+ tokio::fs::write(&path, contents)
.await
.map_err(|error| Error::IoError(error.kind()))?;