mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-14 20:11:37 +03:00
Merge pull request #1707 from UnHumbleBen/patch-1
Removed unnecessary and confusing clone of String
This commit is contained in:
commit
640c807736
@ -60,10 +60,9 @@ impl Store {
|
||||
let array = js_sys::Array::new();
|
||||
for item in self.data.iter() {
|
||||
let child = js_sys::Array::new();
|
||||
let s = item.title.clone();
|
||||
child.push(&JsValue::from(&s));
|
||||
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