From b82168bc6abc1b4b99a19ffb97b6781643c1c5ce Mon Sep 17 00:00:00 2001 From: Tpt Date: Sun, 19 Sep 2021 22:26:29 +0200 Subject: [PATCH] Fixes WASM compilation --- lib/src/model/xsd/date_time.rs | 2 +- lib/src/sparql/xml_results.rs | 2 +- lib/src/storage/fallback_backend.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/src/model/xsd/date_time.rs b/lib/src/model/xsd/date_time.rs index 1327ae85..3a38fe9a 100644 --- a/lib/src/model/xsd/date_time.rs +++ b/lib/src/model/xsd/date_time.rs @@ -1345,7 +1345,7 @@ impl Timestamp { fn since_unix_epoch() -> Result { Ok(Duration::new( 0, - Decimal::from_f64(js_sys::Date::now() / 1000.), + Decimal::from_double((js_sys::Date::now() / 1000.).into()), )) } diff --git a/lib/src/sparql/xml_results.rs b/lib/src/sparql/xml_results.rs index e3f6b11c..51e0aff0 100644 --- a/lib/src/sparql/xml_results.rs +++ b/lib/src/sparql/xml_results.rs @@ -546,7 +546,7 @@ impl ResultsIterator { new_bindings[*var] = term.take() } else { return Err( - invalid_data_error(format!("The variable '{}' is used in a binding but not declared in the variables list", self.reader.decode(&var).map_err(map_xml_error)?)).into() + invalid_data_error(format!("The variable '{}' is used in a binding but not declared in the variables list", self.reader.decode(var).map_err(map_xml_error)?)).into() ); } } else { diff --git a/lib/src/storage/fallback_backend.rs b/lib/src/storage/fallback_backend.rs index 081f81f6..bdda914e 100644 --- a/lib/src/storage/fallback_backend.rs +++ b/lib/src/storage/fallback_backend.rs @@ -1,7 +1,6 @@ use std::collections::btree_map::Entry; use std::collections::BTreeMap; use std::io::Result; -use std::path::Path; use std::sync::{Arc, Mutex, RwLock}; #[derive(Clone)]