mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-19 03:06:26 +00:00
increase rust version from 1.85 to 1.89
This commit is contained in:
@ -52,10 +52,10 @@ const MAX_FRAME_HEADER_SIZE: usize = 9;
|
||||
/// a message in this queue only if it is empty to avoid filling
|
||||
/// the channel *and* the BBQueue.
|
||||
pub fn extractor_writer_bbqueue(
|
||||
bbbuffers: &mut Vec<BBBuffer>,
|
||||
bbbuffers: &'_ mut Vec<BBBuffer>,
|
||||
total_bbbuffer_capacity: usize,
|
||||
channel_capacity: usize,
|
||||
) -> (ExtractorBbqueueSender, WriterBbqueueReceiver) {
|
||||
) -> (ExtractorBbqueueSender<'_>, WriterBbqueueReceiver<'_>) {
|
||||
let current_num_threads = rayon::current_num_threads();
|
||||
let bbbuffer_capacity = total_bbbuffer_capacity.checked_div(current_num_threads).unwrap();
|
||||
bbbuffers.resize_with(current_num_threads, || BBBuffer::new(bbbuffer_capacity));
|
||||
|
@ -6,9 +6,7 @@ use rustc_hash::FxBuildHasher;
|
||||
use serde::de::{DeserializeSeed, Deserializer as _, Visitor};
|
||||
use serde_json::value::RawValue;
|
||||
|
||||
use crate::documents::{
|
||||
validate_document_id_str, DocumentIdExtractionError, FieldIdMapper, PrimaryKey,
|
||||
};
|
||||
use crate::documents::{validate_document_id_str, DocumentIdExtractionError, PrimaryKey};
|
||||
use crate::fields_ids_map::MutFieldIdMapper;
|
||||
use crate::{FieldId, UserError};
|
||||
|
||||
@ -235,28 +233,6 @@ impl<'de, 'a, Mapper: MutFieldIdMapper> Visitor<'de> for MutFieldIdMapVisitor<'a
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FieldIdMapVisitor<'a, Mapper: FieldIdMapper>(pub &'a Mapper);
|
||||
|
||||
impl<'de, Mapper: FieldIdMapper> Visitor<'de> for FieldIdMapVisitor<'_, Mapper> {
|
||||
type Value = Option<FieldId>;
|
||||
|
||||
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(formatter, "expecting a string")
|
||||
}
|
||||
fn visit_borrowed_str<E>(self, v: &'de str) -> std::result::Result<Self::Value, E>
|
||||
where
|
||||
E: serde::de::Error,
|
||||
{
|
||||
Ok(self.0.id(v))
|
||||
}
|
||||
|
||||
fn visit_str<E>(self, v: &str) -> std::result::Result<Self::Value, E>
|
||||
where
|
||||
E: serde::de::Error,
|
||||
{
|
||||
Ok(self.0.id(v))
|
||||
}
|
||||
}
|
||||
pub struct DocumentIdVisitor<'indexer>(pub &'indexer Bump);
|
||||
|
||||
impl<'de, 'indexer: 'de> Visitor<'de> for DocumentIdVisitor<'indexer> {
|
||||
|
@ -138,7 +138,7 @@ impl<T: MostlySend> ThreadLocal<T> {
|
||||
self.inner.get_or_default().as_ref()
|
||||
}
|
||||
|
||||
pub fn iter_mut(&mut self) -> IterMut<T> {
|
||||
pub fn iter_mut(&mut self) -> IterMut<'_, T> {
|
||||
IterMut(self.inner.iter_mut())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user