clippy: needless_lifetimes

This commit is contained in:
Louis Dureuil 2023-01-31 11:11:49 +01:00
parent cbf029f64c
commit 20f05efb3c
No known key found for this signature in database
5 changed files with 32 additions and 32 deletions

View File

@ -348,10 +348,10 @@ impl Index {
/* external documents ids */ /* external documents ids */
/// Writes the external documents ids and internal ids (i.e. `u32`). /// Writes the external documents ids and internal ids (i.e. `u32`).
pub(crate) fn put_external_documents_ids<'a>( pub(crate) fn put_external_documents_ids(
&self, &self,
wtxn: &mut RwTxn, wtxn: &mut RwTxn,
external_documents_ids: &ExternalDocumentsIds<'a>, external_documents_ids: &ExternalDocumentsIds<'_>,
) -> heed::Result<()> { ) -> heed::Result<()> {
let ExternalDocumentsIds { hard, soft, .. } = external_documents_ids; let ExternalDocumentsIds { hard, soft, .. } = external_documents_ids;
let hard = hard.as_fst().as_bytes(); let hard = hard.as_fst().as_bytes();
@ -426,7 +426,7 @@ impl Index {
} }
/// Returns the `rtree` which associates coordinates to documents ids. /// Returns the `rtree` which associates coordinates to documents ids.
pub fn geo_rtree<'t>(&self, rtxn: &'t RoTxn) -> Result<Option<RTree<GeoPoint>>> { pub fn geo_rtree(&self, rtxn: &RoTxn) -> Result<Option<RTree<GeoPoint>>> {
match self match self
.main .main
.get::<_, Str, SerdeBincode<RTree<GeoPoint>>>(rtxn, main_key::GEO_RTREE_KEY)? .get::<_, Str, SerdeBincode<RTree<GeoPoint>>>(rtxn, main_key::GEO_RTREE_KEY)?

View File

@ -182,15 +182,15 @@ impl<'t> Criterion for Proximity<'t> {
} }
} }
fn resolve_candidates<'t>( fn resolve_candidates(
ctx: &'t dyn Context, ctx: &dyn Context,
query_tree: &Operation, query_tree: &Operation,
proximity: u8, proximity: u8,
cache: &mut Cache, cache: &mut Cache,
wdcache: &mut WordDerivationsCache, wdcache: &mut WordDerivationsCache,
) -> Result<RoaringBitmap> { ) -> Result<RoaringBitmap> {
fn resolve_operation<'t>( fn resolve_operation(
ctx: &'t dyn Context, ctx: &dyn Context,
query_tree: &Operation, query_tree: &Operation,
proximity: u8, proximity: u8,
cache: &mut Cache, cache: &mut Cache,
@ -243,8 +243,8 @@ fn resolve_candidates<'t>(
Ok(result) Ok(result)
} }
fn mdfs_pair<'t>( fn mdfs_pair(
ctx: &'t dyn Context, ctx: &dyn Context,
left: &Operation, left: &Operation,
right: &Operation, right: &Operation,
proximity: u8, proximity: u8,
@ -298,8 +298,8 @@ fn resolve_candidates<'t>(
Ok(output) Ok(output)
} }
fn mdfs<'t>( fn mdfs(
ctx: &'t dyn Context, ctx: &dyn Context,
branches: &[Operation], branches: &[Operation],
proximity: u8, proximity: u8,
cache: &mut Cache, cache: &mut Cache,

View File

@ -239,15 +239,15 @@ fn alterate_query_tree(
Ok(query_tree) Ok(query_tree)
} }
fn resolve_candidates<'t>( fn resolve_candidates(
ctx: &'t dyn Context, ctx: &dyn Context,
query_tree: &Operation, query_tree: &Operation,
number_typos: u8, number_typos: u8,
cache: &mut HashMap<(Operation, u8), RoaringBitmap>, cache: &mut HashMap<(Operation, u8), RoaringBitmap>,
wdcache: &mut WordDerivationsCache, wdcache: &mut WordDerivationsCache,
) -> Result<RoaringBitmap> { ) -> Result<RoaringBitmap> {
fn resolve_operation<'t>( fn resolve_operation(
ctx: &'t dyn Context, ctx: &dyn Context,
query_tree: &Operation, query_tree: &Operation,
number_typos: u8, number_typos: u8,
cache: &mut HashMap<(Operation, u8), RoaringBitmap>, cache: &mut HashMap<(Operation, u8), RoaringBitmap>,
@ -276,8 +276,8 @@ fn resolve_candidates<'t>(
} }
} }
fn mdfs<'t>( fn mdfs(
ctx: &'t dyn Context, ctx: &dyn Context,
branches: &[Operation], branches: &[Operation],
mana: u8, mana: u8,
cache: &mut HashMap<(Operation, u8), RoaringBitmap>, cache: &mut HashMap<(Operation, u8), RoaringBitmap>,

View File

@ -574,9 +574,9 @@ fn remove_from_word_docids(
Ok(()) Ok(())
} }
fn remove_docids_from_field_id_docid_facet_value<'i, 'a>( fn remove_docids_from_field_id_docid_facet_value(
index: &'i Index, index: &Index,
wtxn: &'a mut heed::RwTxn, wtxn: &mut heed::RwTxn,
facet_type: FacetType, facet_type: FacetType,
field_id: FieldId, field_id: FieldId,
to_remove: &RoaringBitmap, to_remove: &RoaringBitmap,

View File

@ -157,9 +157,9 @@ impl FacetsUpdateIncrementalInner {
/// ///
/// ## Return /// ## Return
/// See documentation of `insert_in_level` /// See documentation of `insert_in_level`
fn insert_in_level_0<'t>( fn insert_in_level_0(
&self, &self,
txn: &'t mut RwTxn, txn: &mut RwTxn,
field_id: u16, field_id: u16,
facet_value: &[u8], facet_value: &[u8],
docids: &RoaringBitmap, docids: &RoaringBitmap,
@ -211,9 +211,9 @@ impl FacetsUpdateIncrementalInner {
/// - `InsertionResult::Insert` means that inserting the `facet_value` into the `level` resulted /// - `InsertionResult::Insert` means that inserting the `facet_value` into the `level` resulted
/// in the addition of a new key in that level, and that therefore the number of children /// in the addition of a new key in that level, and that therefore the number of children
/// of the parent node should be incremented. /// of the parent node should be incremented.
fn insert_in_level<'t>( fn insert_in_level(
&self, &self,
txn: &'t mut RwTxn, txn: &mut RwTxn,
field_id: u16, field_id: u16,
level: u8, level: u8,
facet_value: &[u8], facet_value: &[u8],
@ -348,9 +348,9 @@ impl FacetsUpdateIncrementalInner {
} }
/// Insert the given facet value and corresponding document ids in the database. /// Insert the given facet value and corresponding document ids in the database.
pub fn insert<'t>( pub fn insert(
&self, &self,
txn: &'t mut RwTxn, txn: &mut RwTxn,
field_id: u16, field_id: u16,
facet_value: &[u8], facet_value: &[u8],
docids: &RoaringBitmap, docids: &RoaringBitmap,
@ -470,9 +470,9 @@ impl FacetsUpdateIncrementalInner {
/// in level 1, the key with the left bound `3` had to be changed to the next facet value (e.g. 4). /// in level 1, the key with the left bound `3` had to be changed to the next facet value (e.g. 4).
/// In that case `DeletionResult::Reduce` is returned. The parent of the reduced key may need to adjust /// In that case `DeletionResult::Reduce` is returned. The parent of the reduced key may need to adjust
/// its left bound as well. /// its left bound as well.
fn delete_in_level<'t>( fn delete_in_level(
&self, &self,
txn: &'t mut RwTxn, txn: &mut RwTxn,
field_id: u16, field_id: u16,
level: u8, level: u8,
facet_value: &[u8], facet_value: &[u8],
@ -529,9 +529,9 @@ impl FacetsUpdateIncrementalInner {
} }
} }
fn delete_in_level_0<'t>( fn delete_in_level_0(
&self, &self,
txn: &'t mut RwTxn, txn: &mut RwTxn,
field_id: u16, field_id: u16,
facet_value: &[u8], facet_value: &[u8],
docids: &RoaringBitmap, docids: &RoaringBitmap,
@ -557,9 +557,9 @@ impl FacetsUpdateIncrementalInner {
} }
} }
pub fn delete<'t>( pub fn delete(
&self, &self,
txn: &'t mut RwTxn, txn: &mut RwTxn,
field_id: u16, field_id: u16,
facet_value: &[u8], facet_value: &[u8],
docids: &RoaringBitmap, docids: &RoaringBitmap,