From 09b37b4a433f87803636d938e28ad19cdd461bc8 Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Mon, 5 Aug 2019 22:59:53 -0700 Subject: [PATCH] Removed unnecessary and confusing clone of String --- examples/todomvc/src/store.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/todomvc/src/store.rs b/examples/todomvc/src/store.rs index 6b733932..44905729 100644 --- a/examples/todomvc/src/store.rs +++ b/examples/todomvc/src/store.rs @@ -60,8 +60,7 @@ 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()));