Skip to content

Commit

Permalink
Accept Clippy 1.83 explicit lifetime elision lints
Browse files Browse the repository at this point in the history
These lifetimes are not used in their `impl` blocks so they can be
safely elided.
  • Loading branch information
the-mikedavis committed Dec 4, 2024
1 parent 305f34f commit f034382
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/aff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ pub(crate) struct AffixesIter<'index, 'word, C: AffixKind + 'static> {
chars_matched: usize,
}

impl<'index, 'word, C: AffixKind> Iterator for AffixesIter<'index, 'word, C> {
impl<'index, C: AffixKind> Iterator for AffixesIter<'index, '_, C> {
type Item = &'index Affix<C>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion src/aff/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct AffLineParser<'aff> {
compound_patterns: Vec<CompoundPattern>,
}

impl<'aff> Default for AffLineParser<'aff> {
impl Default for AffLineParser<'_> {
fn default() -> Self {
use crate::alloc::vec;

Expand Down
2 changes: 1 addition & 1 deletion src/hash_bag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ where
key: &'key Q,
}

impl<'bag, 'key, Q: ?Sized, K, V> Iterator for GetAllIter<'bag, 'key, Q, K, V>
impl<'bag, Q: ?Sized, K, V> Iterator for GetAllIter<'bag, '_, Q, K, V>
where
K: Borrow<Q>,
Q: Hash + Eq,
Expand Down
2 changes: 1 addition & 1 deletion src/suggester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct Suggester<'a, S: BuildHasher> {
ngram_suggest: bool,
}

impl<'a, S: BuildHasher> fmt::Debug for Suggester<'a, S> {
impl<S: BuildHasher> fmt::Debug for Suggester<'_, S> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Suggester")
.field("ngram_suggest", &self.ngram_suggest)
Expand Down
2 changes: 1 addition & 1 deletion src/suggester/ngram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<T: PartialEq + Eq> PartialOrd<Self> for MinScored<T> {
}
}

impl<'a, S: BuildHasher> Suggester<'a, S> {
impl<S: BuildHasher> Suggester<'_, S> {
pub(super) fn ngram_suggest(&self, word_str: &str, out: &mut Vec<String>) {
// First step: find 100 stems in the word list with the best ngram score.

Expand Down

0 comments on commit f034382

Please sign in to comment.