Fixes two warnings when building the JS bindings

pull/46/head
Tpt 4 years ago
parent db6dbea1ec
commit e787eb69f5
  1. 4
      lib/src/model/xsd/date_time.rs
  2. 1
      lib/src/store/binary_encoder.rs
  3. 2
      lib/src/store/mod.rs
  4. 2
      lib/src/store/rocksdb.rs
  5. 2
      lib/src/store/sled.rs

@ -10,7 +10,7 @@ use std::error::Error;
use std::fmt;
use std::hash::{Hash, Hasher};
use std::str::FromStr;
use std::time::{SystemTime, SystemTimeError};
use std::time::SystemTimeError;
/// [XML Schema `dateTime` datatype](https://www.w3.org/TR/xmlschema11-2/#dateTime) implementation.
#[derive(Eq, PartialEq, PartialOrd, Debug, Clone, Copy, Hash)]
@ -1351,6 +1351,8 @@ fn since_unix_epoch() -> Result<Duration, DateTimeError> {
#[cfg(not(target_arch = "wasm32"))]
fn since_unix_epoch() -> Result<Duration, DateTimeError> {
use std::time::SystemTime;
SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)?
.try_into()

@ -11,6 +11,7 @@ use std::mem::size_of;
type EncodedTerm = crate::store::numeric_encoder::EncodedTerm<StrHash>;
type EncodedQuad = crate::store::numeric_encoder::EncodedQuad<StrHash>;
pub const LATEST_STORAGE_VERSION: u64 = 0;
pub const WRITTEN_TERM_MAX_SIZE: usize = size_of::<u8>() + 2 * size_of::<StrHash>();
// Encoded term type blocks

@ -33,8 +33,6 @@ use std::io;
use std::io::{BufRead, Write};
use std::iter::Iterator;
const LATEST_STORAGE_VERSION: u64 = 0;
pub(crate) trait ReadableEncodedStore: StrLookup {
type QuadsIter: Iterator<Item = Result<EncodedQuad<Self::StrId>, Self::Error>> + 'static;

@ -10,7 +10,7 @@ use crate::store::numeric_encoder::{
};
use crate::store::{
dump_dataset, dump_graph, get_encoded_quad_pattern, load_dataset, load_graph,
ReadableEncodedStore, WritableEncodedStore, LATEST_STORAGE_VERSION,
ReadableEncodedStore, WritableEncodedStore,
};
use rocksdb::*;
use std::collections::HashMap;

@ -10,7 +10,7 @@ use crate::store::numeric_encoder::{
};
use crate::store::{
dump_dataset, dump_graph, get_encoded_quad_pattern, load_dataset, load_graph,
ReadableEncodedStore, StoreOrParseError, WritableEncodedStore, LATEST_STORAGE_VERSION,
ReadableEncodedStore, StoreOrParseError, WritableEncodedStore,
};
use sled::transaction::{
ConflictableTransactionError, TransactionError, Transactional, TransactionalTree,

Loading…
Cancel
Save