Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Jan 8, 2025
1 parent 4549a3a commit 161a931
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion charabia/src/normalizer/ae_oe_normalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion charabia/src/normalizer/arabic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion charabia/src/segmenter/arabic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions charabia/src/segmenter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self::Item> {
Expand Down Expand Up @@ -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<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion charabia/src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 161a931

Please sign in to comment.