Skip to content

Commit

Permalink
examples: remove todo without affecting ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
thlorenz committed May 15, 2021
1 parent f2657cd commit b814db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/dart/todo/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl Model {
return warn!("Could not find Todo with id '{}'", id)
}
};
self.todos.swap_remove(idx);
self.todos.remove(idx);
}

RemoveCompleted => self.todos.retain(|todo| !todo.completed),
Expand Down

0 comments on commit b814db6

Please sign in to comment.