diff --git a/src/game/pathfinder.rs b/src/game/pathfinder.rs index 151e41c..348a878 100644 --- a/src/game/pathfinder.rs +++ b/src/game/pathfinder.rs @@ -1,6 +1,6 @@ use js_sys::{Array, Object}; use serde::{Deserialize, Serialize}; -use wasm_bindgen::{prelude::*, JsCast}; +use wasm_bindgen::prelude::*; #[derive(Serialize, Deserialize, Debug)] pub struct Position { @@ -14,8 +14,8 @@ extern "C" { /// without costMatrix specified (see below) use terrain data only. #[wasm_bindgen(js_name = searchPath)] pub fn search_path( - origin: &Object, - goal: &Object, + origin: &JsValue, + goal: &JsValue, options: Option<&SearchPathOptions>, ) -> SearchResults; } diff --git a/src/objects/impls/store.rs b/src/objects/impls/store.rs index 2cb5683..ba84db0 100644 --- a/src/objects/impls/store.rs +++ b/src/objects/impls/store.rs @@ -1,6 +1,6 @@ use crate::constants::ResourceType; use js_sys::Object; -use wasm_bindgen::{prelude::*, JsCast}; +use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" {