Fixes WASM compilation

pull/171/head
Tpt 3 years ago
parent f72f18842d
commit b82168bc6a
  1. 2
      lib/src/model/xsd/date_time.rs
  2. 2
      lib/src/sparql/xml_results.rs
  3. 1
      lib/src/storage/fallback_backend.rs

@ -1345,7 +1345,7 @@ impl Timestamp {
fn since_unix_epoch() -> Result<Duration, DateTimeError> { fn since_unix_epoch() -> Result<Duration, DateTimeError> {
Ok(Duration::new( Ok(Duration::new(
0, 0,
Decimal::from_f64(js_sys::Date::now() / 1000.), Decimal::from_double((js_sys::Date::now() / 1000.).into()),
)) ))
} }

@ -546,7 +546,7 @@ impl<R: BufRead> ResultsIterator<R> {
new_bindings[*var] = term.take() new_bindings[*var] = term.take()
} else { } else {
return Err( 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 { } else {

@ -1,7 +1,6 @@
use std::collections::btree_map::Entry; use std::collections::btree_map::Entry;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::io::Result; use std::io::Result;
use std::path::Path;
use std::sync::{Arc, Mutex, RwLock}; use std::sync::{Arc, Mutex, RwLock};
#[derive(Clone)] #[derive(Clone)]

Loading…
Cancel
Save