diff options
Diffstat (limited to 'examples/todos/src/main.rs')
-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, |