chore: Remove most of the warnings

This commit is contained in:
Clément Renault 2019-04-26 14:50:54 +02:00
parent 74acf83464
commit 2e9fbd07cd
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE
6 changed files with 7 additions and 12 deletions

View File

@ -8,11 +8,7 @@ use std::{error, fmt};
use arc_swap::{ArcSwap, Lease};
use byteorder::{ReadBytesExt, BigEndian};
use hashbrown::HashMap;
use meilidb_core::criterion::Criteria;
use meilidb_core::QueryBuilder;
use meilidb_core::shared_data_cursor::{FromSharedDataCursor, SharedDataCursor};
use meilidb_core::write_to_bytes::WriteToBytes;
use meilidb_core::DocumentId;
use meilidb_core::{criterion::Criteria, QueryBuilder, DocumentId};
use rmp_serde::decode::{Error as RmpError};
use sdset::SetBuf;
use serde::de;

View File

@ -24,7 +24,7 @@ impl ser::Serializer for ConvertToNumber {
Ok(Number::Unsigned(u64::from(value)))
}
fn serialize_char(self, value: char) -> Result<Self::Ok, Self::Error> {
fn serialize_char(self, _value: char) -> Result<Self::Ok, Self::Error> {
Err(SerializerError::UnrankableType { type_name: "char" })
}

View File

@ -16,7 +16,7 @@ impl ser::Serializer for ConvertToString {
type SerializeStruct = ser::Impossible<Self::Ok, Self::Error>;
type SerializeStructVariant = ser::Impossible<Self::Ok, Self::Error>;
fn serialize_bool(self, value: bool) -> Result<Self::Ok, Self::Error> {
fn serialize_bool(self, _value: bool) -> Result<Self::Ok, Self::Error> {
Err(SerializerError::UnserializableType { type_name: "boolean" })
}

View File

@ -56,11 +56,11 @@ impl<'a> ser::Serializer for ExtractDocumentId<'a> {
f64 => serialize_f64,
}
fn serialize_str(self, value: &str) -> Result<Self::Ok, Self::Error> {
fn serialize_str(self, _value: &str) -> Result<Self::Ok, Self::Error> {
Err(SerializerError::UnserializableType { type_name: "str" })
}
fn serialize_bytes(self, _v: &[u8]) -> Result<Self::Ok, Self::Error> {
fn serialize_bytes(self, _value: &[u8]) -> Result<Self::Ok, Self::Error> {
Err(SerializerError::UnserializableType { type_name: "&[u8]" })
}

View File

@ -2,7 +2,6 @@ use meilidb_core::DocumentId;
use serde::ser;
use serde::Serialize;
use crate::database::RawIndex;
use crate::indexer::Indexer as RawIndexer;
use crate::schema::SchemaAttr;
use super::{SerializerError, ConvertToString};
@ -24,7 +23,7 @@ impl<'a> ser::Serializer for Indexer<'a> {
type SerializeStruct = StructSerializer<'a>;
type SerializeStructVariant = ser::Impossible<Self::Ok, Self::Error>;
fn serialize_bool(self, value: bool) -> Result<Self::Ok, Self::Error> {
fn serialize_bool(self, _value: bool) -> Result<Self::Ok, Self::Error> {
Err(SerializerError::UnindexableType { type_name: "boolean" })
}

View File

@ -4,7 +4,7 @@ use serde::ser;
use crate::database::RawIndex;
use crate::ranked_map::RankedMap;
use crate::indexer::Indexer as RawIndexer;
use crate::schema::{Schema, SchemaAttr};
use crate::schema::Schema;
use super::{SerializerError, ConvertToString, ConvertToNumber, Indexer};
pub struct Serializer<'a> {