summaryrefslogtreecommitdiffstats
path: root/examples/todos
diff options
context:
space:
mode:
authorLibravatar Yuri Astrakhan <YuriAstrakhan@gmail.com>2023-09-19 01:31:10 -0400
committerLibravatar Yuri Astrakhan <YuriAstrakhan@gmail.com>2023-09-19 01:32:56 -0400
commit3d6b9637c3b1c9f3c654a3ecef7a247cfd6edef3 (patch)
tree70ffb135b91c824caa37a0fe4742179088e5a638 /examples/todos
parent4613eb26cba3ded83f25ebdefd01c983c79a9d59 (diff)
downloadiced-3d6b9637c3b1c9f3c654a3ecef7a247cfd6edef3.tar.gz
iced-3d6b9637c3b1c9f3c654a3ecef7a247cfd6edef3.tar.bz2
iced-3d6b9637c3b1c9f3c654a3ecef7a247cfd6edef3.zip
Chore: Inline format args for ease of reading
A minor cleanup to inline all simple cases of format arguments. Makes the format strings just a bit easier to read.
Diffstat (limited to 'examples/todos')
-rw-r--r--examples/todos/src/main.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs
index 501bf67e..3048a668 100644
--- a/examples/todos/src/main.rs
+++ b/examples/todos/src/main.rs
@@ -415,8 +415,7 @@ fn view_controls(tasks: &[Task], current_filter: Filter) -> Element<Message> {
row![
text(format!(
- "{} {} left",
- tasks_left,
+ "{tasks_left} {} left",
if tasks_left == 1 { "task" } else { "tasks" }
))
.width(Length::Fill),