Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jul 24, 2024
1 parent 8225f68 commit 6e840e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ impl<'a> Context<'a> {

for diagnostic in self.diagnostics.iter().cloned() {
if let Some(f) = self.file_ignore_directive.as_mut() {
if f.check_used(&diagnostic.code) {
if f.check_used(diagnostic.code) {
continue;
}
}
Expand All @@ -245,7 +245,7 @@ impl<'a> Context<'a> {
if let Some(l) =
self.line_ignore_directives.get_mut(&(diagnostic_line - 1))
{
if l.check_used(&diagnostic.code) {
if l.check_used(diagnostic.code) {
continue;
}
}
Expand Down Expand Up @@ -438,7 +438,7 @@ impl<'a> Context<'a> {
range,
text_info: self.text_info().clone(),
message: message.to_string(),
code: code,
code,
hint: maybe_hint,
fixes,
custom_docs_url: None,
Expand Down
2 changes: 1 addition & 1 deletion src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Diagnostic for LintDiagnostic {
}

fn code(&self) -> Cow<'_, str> {
Cow::Borrowed(&self.code)
Cow::Borrowed(self.code)
}

fn message(&self) -> Cow<'_, str> {
Expand Down

0 comments on commit 6e840e7

Please sign in to comment.