diff --git a/charabia/src/normalizer/ae_oe_normalizer.rs b/charabia/src/normalizer/ae_oe_normalizer.rs index 03737a6..2437a04 100644 --- a/charabia/src/normalizer/ae_oe_normalizer.rs +++ b/charabia/src/normalizer/ae_oe_normalizer.rs @@ -4,7 +4,6 @@ use crate::{Script, Token}; /// This module contains the implementation of the `AeOeNormalizer` struct, which is a character normalizer /// that replaces the characters 'œ', 'æ', 'Œ', and 'Æ' with their respective replacements 'oe', 'ae', 'OE', and 'AE'. /// It also provides a test suite to validate the normalizer's functionality. - pub struct AeOeNormalizer; // All normalizers only need to implement the method `normalize_char` and the method `should_normalize` of the `CharNormalizer` trait. diff --git a/charabia/src/normalizer/arabic.rs b/charabia/src/normalizer/arabic.rs index 306b06e..0e8ebdb 100644 --- a/charabia/src/normalizer/arabic.rs +++ b/charabia/src/normalizer/arabic.rs @@ -10,7 +10,6 @@ use crate::{Script, Token}; /// - Normalizing the arabic Taa Marbuta 'ة' to 'ه' /// https://en.wikipedia.org/wiki/Arabic_alphabet /// https://en.wikipedia.org/wiki/Kashida - pub struct ArabicNormalizer; // All normalizers only need to implement the method `normalize_char` and the method `should_normalize` of the `CharNormalizer` trait. diff --git a/charabia/src/segmenter/arabic.rs b/charabia/src/segmenter/arabic.rs index 1cf567b..8ae4d48 100644 --- a/charabia/src/segmenter/arabic.rs +++ b/charabia/src/segmenter/arabic.rs @@ -7,7 +7,6 @@ use super::Segmenter; /// One possible solution is to segment any word that starts with `ال` into two words. The `ال` and the rest of the word. /// with this solution, we will have `الشجرة` (the tree) segmented into `ال` (the) and `شجرة` (tree). and if we search for `شجرة` (tree) or `الشجرة` (thetree) we will find results. /// Some Arabic text starts with `ال` and not meant to be (the) like `البانيا` (Albania). In this case, we will have `ال` and `بانيا` segmented. and if we search for `البانيا` we will find results. - pub struct ArabicSegmenter; // All specialized segmenters only need to implement the method `segment_str` of the `Segmenter` trait. diff --git a/charabia/src/segmenter/mod.rs b/charabia/src/segmenter/mod.rs index 653afe5..d0fa9ac 100644 --- a/charabia/src/segmenter/mod.rs +++ b/charabia/src/segmenter/mod.rs @@ -177,7 +177,7 @@ impl<'o, 'aho, 'lang> SegmentedStrIter<'o, 'aho, 'lang> { } } -impl<'o, 'aho, 'lang> Iterator for SegmentedStrIter<'o, 'aho, 'lang> { +impl<'o> Iterator for SegmentedStrIter<'o, '_, '_> { type Item = &'o str; fn next(&mut self) -> Option { @@ -220,7 +220,7 @@ impl<'o, 'aho> AhoSegmentedStrIter<'o, 'aho> { } } -impl<'o, 'aho> Iterator for AhoSegmentedStrIter<'o, 'aho> { +impl<'o> Iterator for AhoSegmentedStrIter<'o, '_> { type Item = (&'o str, MatchType); fn next(&mut self) -> Option { diff --git a/charabia/src/tokenizer.rs b/charabia/src/tokenizer.rs index 36b8443..6671f4f 100644 --- a/charabia/src/tokenizer.rs +++ b/charabia/src/tokenizer.rs @@ -103,7 +103,7 @@ pub struct Tokenizer<'tb> { normalizer_option: Cow<'tb, NormalizerOption<'tb>>, } -impl<'tb> Tokenizer<'tb> { +impl Tokenizer<'_> { /// Creates an Iterator over [`Token`]s. /// /// The provided text is segmented creating tokens,