You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid unsafe usage it requires that Geodesy adds Sync + Send to the Grid trait.
Remove the GridLoader class in favour of free functions.
Something like this:
staticGRIDS:Lazy<Mutex<GridCollection>> =
Lazy::new(|| Mutex::new(BTreeMap::<String,Arc<dynGrid>>::new()));#[wasm_bindgen(js_name = loadGrid)]// If no data_view then the key is either a URL or an IndexDb keypubfnload_grid(key:&str,data_view:Option<js::DataView>) -> WasmResult{let parse_grid = //.. Parse and load grid GRIDS.lock().unwrap().add(key, parsed_grid)}//... Later in Geo.get_grid()fnget_grid(&self,key:&str) -> Result<Arc<dynGrid>>{GRIDS.get(key)}
The text was updated successfully, but these errors were encountered:
unsafe
usage it requires thatGeodesy
addsSync + Send
to theGrid
trait.GridLoader
class in favour of free functions.Something like this:
The text was updated successfully, but these errors were encountered: