From f22581187427101e852826470a2b9c56933165a6 Mon Sep 17 00:00:00 2001 From: wtfrank Date: Sun, 24 Mar 2024 16:47:28 +0000 Subject: [PATCH] Pathfinder / as_ref() (#8) --- src/game/pathfinder.rs | 6 +++--- src/objects/impls/store.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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" {