mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-11 23:52:03 +03:00
Makes code clearing by providing code symmetry.
``` child.push(&JsValue::from(&item.title)); child.push(&JsValue::from(item.completed)); child.push(&JsValue::from(&item.id)); ``` Parallel syntax makes it easier to see that each iteration intends to push each of `item`'s fields to `child`.
This commit is contained in:
parent
09b37b4a43
commit
fffcc5ef35
@ -62,7 +62,7 @@ impl Store {
|
||||
let child = js_sys::Array::new();
|
||||
child.push(&JsValue::from(&item.title));
|
||||
child.push(&JsValue::from(item.completed));
|
||||
child.push(&JsValue::from(item.id.to_string()));
|
||||
child.push(&JsValue::from(&item.id));
|
||||
|
||||
array.push(&JsValue::from(child));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user