mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
chore: Remove most of the warnings
This commit is contained in:
parent
74acf83464
commit
2e9fbd07cd
@ -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;
|
||||
|
@ -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" })
|
||||
}
|
||||
|
||||
|
@ -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" })
|
||||
}
|
||||
|
||||
|
@ -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]" })
|
||||
}
|
||||
|
||||
|
@ -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" })
|
||||
}
|
||||
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user