From 5c81125b864ed959cea584542a7a5f6a6e5ff160 Mon Sep 17 00:00:00 2001 From: Jonathan Kingston Date: Mon, 11 Feb 2019 18:43:23 +0000 Subject: [PATCH] Fixup compiler warnings for Todo MVC example --- examples/todomvc/index.js | 5 ++++- examples/todomvc/src/controller.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/todomvc/index.js b/examples/todomvc/index.js index 29a450d1..bc0a79ba 100644 --- a/examples/todomvc/index.js +++ b/examples/todomvc/index.js @@ -1,4 +1,7 @@ // For more comments about what's going on here, check out the `hello_world` // example -import('./pkg/todomvc') +const rust = import('./pkg/todomvc'); + +rust + .then(m => m.run()) .catch(console.error); diff --git a/examples/todomvc/src/controller.rs b/examples/todomvc/src/controller.rs index ebb0ccf4..bfad84c0 100644 --- a/examples/todomvc/src/controller.rs +++ b/examples/todomvc/src/controller.rs @@ -68,7 +68,7 @@ impl Controller { } pub fn set_page(&mut self, raw: String) { - let route = raw.trim_left_matches("#/"); + let route = raw.trim_start_matches("#/"); self.active_route = route.to_string(); self._filter(false); self.add_message(ViewMessage::UpdateFilterButtons(route.to_string()));