From fffcc5ef35d4c109b1f20712a4a5af40c1f2563d Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Mon, 5 Aug 2019 23:16:53 -0700 Subject: [PATCH] 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`. --- examples/todomvc/src/store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/todomvc/src/store.rs b/examples/todomvc/src/store.rs index 44905729d..3de6909ae 100644 --- a/examples/todomvc/src/store.rs +++ b/examples/todomvc/src/store.rs @@ -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)); }