diff options
author | 2023-10-27 03:58:45 +0200 | |
---|---|---|
committer | 2023-10-27 03:58:45 +0200 | |
commit | 65823875791ecebf24d049cc0782e7475a37899b (patch) | |
tree | 1088c656ef7ad9782374952045022d2c104931b2 /examples/todos | |
parent | 8cc19de254c37d3123d5ea1b6513f1f34d35c7c8 (diff) | |
parent | f1b1344d59fa7354615f560bd25ed01ad0c9f865 (diff) | |
download | iced-65823875791ecebf24d049cc0782e7475a37899b.tar.gz iced-65823875791ecebf24d049cc0782e7475a37899b.tar.bz2 iced-65823875791ecebf24d049cc0782e7475a37899b.zip |
Merge branch 'master' into text-editor
Diffstat (limited to 'examples/todos')
-rw-r--r-- | examples/todos/src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index 501bf67e..1ad3aba7 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), @@ -444,7 +443,7 @@ pub enum Filter { } impl Filter { - fn matches(&self, task: &Task) -> bool { + fn matches(self, task: &Task) -> bool { match self { Filter::All => true, Filter::Active => !task.completed, |