Merge pull request #96 from Kerollmops/chore

Make some little changes
This commit is contained in:
Clément Renault 2019-02-03 11:55:06 +01:00 committed by GitHub
commit 06d5a10902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,6 @@ const DATA_SCHEMA: &[u8] = b"data-schema";
pub mod schema;
pub(crate) mod index;
mod deserializer;
mod document_key;
mod serde;
mod update;

View File

@ -19,6 +19,7 @@ pub mod find_id;
pub mod key_to_string;
pub mod serializer;
pub mod indexer_serializer;
pub mod deserializer;
pub fn calculate_hash<T: Hash>(t: &T) -> u64 {
let mut s = DefaultHasher::new();

View File

@ -9,7 +9,7 @@ use serde::de::DeserializeOwned;
use crate::database::{DocumentKey, DocumentKeyAttr};
use crate::database::{retrieve_data_schema, retrieve_data_index};
use crate::database::deserializer::Deserializer;
use crate::database::serde::deserializer::Deserializer;
use crate::database::schema::Schema;
use crate::database::index::Index;
use crate::rank::{QueryBuilder, FilterFunc};

View File

@ -18,7 +18,7 @@ pub struct Document {
}
impl Document {
pub fn from_raw(raw: &RawDocument) -> Document {
fn from_raw(raw: &RawDocument) -> Document {
let len = raw.matches.range.len();
let mut matches = Vec::with_capacity(len);

View File

@ -136,7 +136,7 @@ where D: Deref<Target=DB>,
FI: Fn(DocumentId, &DatabaseView<D>) -> bool,
{
pub fn query(self, query: &str, range: Range<usize>) -> Vec<Document> {
// We give the filtering work to the query distinct builder,
// We delegate the filter work to the distinct query builder,
// specifying a distinct rule that has no effect.
if self.filter.is_some() {
let builder = self.with_distinct(|_, _| None as Option<()>, 1);