From 1fc25148da6971b901f0502de255f3daafb8674c Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Wed, 3 Mar 2021 18:09:19 +0100 Subject: [PATCH] Remove useless where clauses for the criteria --- milli/src/search/criteria/asc_desc.rs | 12 ++++++------ milli/src/search/criteria/proximity.rs | 4 ++-- milli/src/search/criteria/typo.rs | 4 ++-- milli/src/search/criteria/words.rs | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/milli/src/search/criteria/asc_desc.rs b/milli/src/search/criteria/asc_desc.rs index 9af9d53e6..193e9c942 100644 --- a/milli/src/search/criteria/asc_desc.rs +++ b/milli/src/search/criteria/asc_desc.rs @@ -37,7 +37,7 @@ impl<'t> AscDesc<'t> { candidates: Option, field_id: FieldId, facet_type: FacetType, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Self::initial(index, rtxn, query_tree, candidates, field_id, facet_type, true) } @@ -49,7 +49,7 @@ impl<'t> AscDesc<'t> { candidates: Option, field_id: FieldId, facet_type: FacetType, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Self::initial(index, rtxn, query_tree, candidates, field_id, facet_type, false) } @@ -60,7 +60,7 @@ impl<'t> AscDesc<'t> { parent: Box, field_id: FieldId, facet_type: FacetType, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Self::new(index, rtxn, parent, field_id, facet_type, true) } @@ -71,7 +71,7 @@ impl<'t> AscDesc<'t> { parent: Box, field_id: FieldId, facet_type: FacetType, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Self::new(index, rtxn, parent, field_id, facet_type, false) } @@ -84,7 +84,7 @@ impl<'t> AscDesc<'t> { field_id: FieldId, facet_type: FacetType, ascending: bool, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { let faceted_candidates = index.faceted_documents_ids(rtxn, field_id)?; let candidates = match &query_tree { @@ -120,7 +120,7 @@ impl<'t> AscDesc<'t> { field_id: FieldId, facet_type: FacetType, ascending: bool, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Ok(AscDesc { index, diff --git a/milli/src/search/criteria/proximity.rs b/milli/src/search/criteria/proximity.rs index dc05787dd..fe82523ca 100644 --- a/milli/src/search/criteria/proximity.rs +++ b/milli/src/search/criteria/proximity.rs @@ -22,7 +22,7 @@ impl<'t> Proximity<'t> { ctx: &'t dyn Context, query_tree: Option, candidates: Option, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Ok(Proximity { ctx, @@ -38,7 +38,7 @@ impl<'t> Proximity<'t> { pub fn new( ctx: &'t dyn Context, parent: Box, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Ok(Proximity { ctx, diff --git a/milli/src/search/criteria/typo.rs b/milli/src/search/criteria/typo.rs index 5c8592c5e..76c2fbc46 100644 --- a/milli/src/search/criteria/typo.rs +++ b/milli/src/search/criteria/typo.rs @@ -24,7 +24,7 @@ impl<'t> Typo<'t> { ctx: &'t dyn Context, query_tree: Option, candidates: Option, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Ok(Typo { ctx, @@ -41,7 +41,7 @@ impl<'t> Typo<'t> { pub fn new( ctx: &'t dyn Context, parent: Box, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Ok(Typo { ctx, diff --git a/milli/src/search/criteria/words.rs b/milli/src/search/criteria/words.rs index bfb85579a..08cbeaab3 100644 --- a/milli/src/search/criteria/words.rs +++ b/milli/src/search/criteria/words.rs @@ -21,7 +21,7 @@ impl<'t> Words<'t> { ctx: &'t dyn Context, query_tree: Option, candidates: Option, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Ok(Words { ctx, @@ -36,7 +36,7 @@ impl<'t> Words<'t> { pub fn new( ctx: &'t dyn Context, parent: Box, - ) -> anyhow::Result where Self: Sized + ) -> anyhow::Result { Ok(Words { ctx,