Merge pull request #1707 from UnHumbleBen/patch-1

Removed unnecessary and confusing clone of String
This commit is contained in:
Alex Crichton 2019-08-06 09:17:35 -05:00 committed by GitHub
commit 640c807736
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));
}