Breathe life back into this project. #1

Merged
gburd merged 22 commits from gburd/2018edition-fmt-fix-deps into master 2020-01-16 16:27:21 +00:00
6 changed files with 7 additions and 9 deletions
Showing only changes of commit c2122a210c - Show all commits

View file

@ -10,7 +10,6 @@
extern crate failure; extern crate failure;
#[macro_use]
extern crate failure_derive; extern crate failure_derive;
extern crate rusqlite; extern crate rusqlite;

View file

@ -774,7 +774,7 @@ impl<'conn, 'a, W> Tx<'conn, 'a, W> where W: TransactWatcher {
tx_might_update_metadata = true; tx_might_update_metadata = true;
} }
let mut queue = match (attribute.fulltext, attribute.multival) { let queue = match (attribute.fulltext, attribute.multival) {
(false, true) => &mut non_fts_many, (false, true) => &mut non_fts_many,
(false, false) => &mut non_fts_one, (false, false) => &mut non_fts_one,
(true, false) => &mut fts_one, (true, false) => &mut fts_one,

View file

@ -154,7 +154,7 @@ impl From<std::io::Error> for MentatError {
impl From<rusqlite::Error> for MentatError { impl From<rusqlite::Error> for MentatError {
fn from(error: rusqlite::Error) -> MentatError { fn from(error: rusqlite::Error) -> MentatError {
let cause = match error.cause() { let cause = match error.source() {
Some(e) => e.to_string(), Some(e) => e.to_string(),
None => "".to_string() None => "".to_string()
}; };

View file

@ -248,9 +248,9 @@ impl Puller {
// Collect :db/id if requested. // Collect :db/id if requested.
if let Some(ref alias) = self.db_id_alias { if let Some(ref alias) = self.db_id_alias {
for e in entities.iter() { for e in entities.iter() {
let mut r = maps.entry(*e) let r = maps.entry(*e)
.or_insert(ValueRc::new(StructuredMap::default())); .or_insert(ValueRc::new(StructuredMap::default()));
let mut m = ValueRc::get_mut(r).unwrap(); let m = ValueRc::get_mut(r).unwrap();
m.insert(alias.clone(), Binding::Scalar(TypedValue::Ref(*e))); m.insert(alias.clone(), Binding::Scalar(TypedValue::Ref(*e)));
} }
} }
@ -261,12 +261,12 @@ impl Puller {
for e in entities.iter() { for e in entities.iter() {
if let Some(binding) = cache.binding_for_e(*e) { if let Some(binding) = cache.binding_for_e(*e) {
let mut r = maps.entry(*e) let r = maps.entry(*e)
.or_insert(ValueRc::new(StructuredMap::default())); .or_insert(ValueRc::new(StructuredMap::default()));
// Get into the inner map so we can accumulate a value. // Get into the inner map so we can accumulate a value.
// We can unwrap here because we created all of these maps… // We can unwrap here because we created all of these maps…
let mut m = ValueRc::get_mut(r).unwrap(); let m = ValueRc::get_mut(r).unwrap();
m.insert(name.clone(), binding); m.insert(name.clone(), binding);
} }

View file

@ -81,7 +81,7 @@ impl From<serde_json::Error> for TolstoyError {
impl From<rusqlite::Error> for TolstoyError { impl From<rusqlite::Error> for TolstoyError {
fn from(error: rusqlite::Error) -> TolstoyError { fn from(error: rusqlite::Error) -> TolstoyError {
let cause = match error.cause() { let cause = match error.source() {
Some(e) => e.to_string(), Some(e) => e.to_string(),
None => "".to_string() None => "".to_string()
}; };

View file

@ -32,7 +32,6 @@ use edn::entities::{
use mentat_db::{ use mentat_db::{
CORE_SCHEMA_VERSION, CORE_SCHEMA_VERSION,
timelines, timelines,
debug,
entids, entids,
PartitionMap, PartitionMap,
}; };