Skip to content

Commit

Permalink
refactor: enable needless_lifetimes clippy rule (#4973)
Browse files Browse the repository at this point in the history
  • Loading branch information
unvalley authored Jan 27, 2025
1 parent 5184067 commit e5d99df
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ allow_attributes = "deny"
cargo_common_metadata = "allow"
empty_docs = "allow" # there are some false positives inside biome_wasm
multiple_crate_versions = "allow"
needless_lifetimes = "allow"

# pedantic
assigning_clones = "warn"
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_analyze/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ mod tests {
nodes: Vec<RawLanguageKind>,
}

impl<'a> QueryMatcher<RawLanguage> for &'a mut BufferMatcher {
impl QueryMatcher<RawLanguage> for &mut BufferMatcher {
fn match_query(&mut self, params: MatchQueryParams<RawLanguage>) {
self.nodes.push(
params
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_formatter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,7 @@ mod tests {
}
}

impl<'a> std::fmt::Display for DiagnosticPrinter<'a> {
impl std::fmt::Display for DiagnosticPrinter<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
for diagnostic in self.diagnostics {
diagnostic.description(f)?;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::needless_lifetimes)]
use grit_pattern_matcher::pattern::VariableSource;
use grit_util::ByteRange;

Expand Down
2 changes: 1 addition & 1 deletion crates/biome_yaml_parser/src/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub(crate) struct YamlLexer<'src> {
context: YamlLexContext,
}

impl<'source> YamlLexer<'source> {
impl YamlLexer<'_> {
fn current_char(&self) -> Option<u8> {
self.source.as_bytes().get(self.position).copied()
}
Expand Down

0 comments on commit e5d99df

Please sign in to comment.