mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-29 20:51:37 +00:00
Remove compiler warnings in todo example, simplify usage of elements into element.rs and fix a bug with focus not working on edit.
This commit is contained in:
@ -140,14 +140,11 @@ impl Controller {
|
||||
/// Set all items to complete or active.
|
||||
fn toggle_all(&mut self, completed: bool) {
|
||||
let mut vals = Vec::new();
|
||||
self.store
|
||||
.find(
|
||||
ItemQuery::EmptyItemQuery,
|
||||
).map(|data| {
|
||||
for item in data.iter() {
|
||||
vals.push(item.id.clone());
|
||||
}
|
||||
});
|
||||
self.store.find(ItemQuery::EmptyItemQuery).map(|data| {
|
||||
for item in data.iter() {
|
||||
vals.push(item.id.clone());
|
||||
}
|
||||
});
|
||||
for id in vals.iter() {
|
||||
self.toggle_completed(id.to_string(), completed);
|
||||
}
|
||||
|
Reference in New Issue
Block a user