Upgrades to Rust 1.40

pull/22/head
Tpt 5 years ago
parent 1bd91f6797
commit 87f2823688
  1. 8
      lib/src/store/numeric_encoder.rs
  2. 4
      lib/src/store/rocksdb.rs
  3. 2
      wikibase/src/main.rs

@ -3,7 +3,7 @@ use crate::model::vocab::xsd;
use crate::model::xsd::Decimal;
use crate::model::*;
use crate::Result;
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use byteorder::{LittleEndian, ReadBytesExt};
use chrono::format::{parse, Parsed, StrftimeItems};
use chrono::prelude::*;
use failure::format_err;
@ -579,7 +579,7 @@ pub trait TermWriter {
impl<W: Write> TermWriter for W {
fn write_term(&mut self, term: EncodedTerm) -> Result<()> {
self.write_u8(term.type_id())?;
self.write_all(&term.type_id().to_le_bytes())?;
match term {
EncodedTerm::DefaultGraph => {}
EncodedTerm::NamedNode { iri_id } => self.write_all(&iri_id.to_le_bytes())?,
@ -600,8 +600,8 @@ impl<W: Write> TermWriter for W {
self.write_all(&value_id.to_le_bytes())?;
}
EncodedTerm::BooleanLiteral(_) => {}
EncodedTerm::FloatLiteral(value) => self.write_f32::<LittleEndian>(*value)?,
EncodedTerm::DoubleLiteral(value) => self.write_f64::<LittleEndian>(*value)?,
EncodedTerm::FloatLiteral(value) => self.write_all(&value.to_le_bytes())?,
EncodedTerm::DoubleLiteral(value) => self.write_all(&value.to_le_bytes())?,
EncodedTerm::IntegerLiteral(value) => self.write_all(&value.to_le_bytes())?,
EncodedTerm::DecimalLiteral(value) => self.write_all(&value.to_le_bytes())?,
EncodedTerm::DateLiteral(value) => {

@ -5,7 +5,7 @@ use failure::format_err;
use rocksdb::*;
use std::io::Cursor;
use std::iter::{empty, once};
use std::mem::replace;
use std::mem::take;
use std::path::Path;
use std::str;
@ -502,7 +502,7 @@ impl RocksDbStoreAutoTransaction<'_> {
.connection
.store
.db
.write(replace(&mut self.inner.batch, WriteBatch::default()))?;
.write(take(&mut self.inner.batch))?;
}
Ok(())
}

@ -97,7 +97,7 @@ where
loader.update_loop();
});
start_server(addr.to_string(), move |request| {
start_server(addr, move |request| {
content_encoding::apply(
request,
handle_request(request, repository.connection().unwrap()),

Loading…
Cancel
Save