refactor: clippy::equatable_if_let (#974)

This commit is contained in:
EdJoPaTo 2024-02-27 13:41:34 +01:00 committed by Josh McKinney
parent 01418eb7c2
commit f7f66928a8
No known key found for this signature in database
GPG key ID: 722287396A903BC5
2 changed files with 2 additions and 1 deletions

View file

@ -66,6 +66,7 @@ unsafe_code = "forbid"
[lints.clippy]
cloned_instead_of_copied = "warn"
default_trait_access = "warn"
equatable_if_let = "warn"
explicit_iter_loop = "warn"
implicit_clone = "warn"
inefficient_to_string = "warn"

View file

@ -984,7 +984,7 @@ impl WidgetRef for Chart<'_> {
coords: dataset.data,
color: dataset.style.fg.unwrap_or(Color::Reset),
});
if let GraphType::Line = dataset.graph_type {
if dataset.graph_type == GraphType::Line {
for data in dataset.data.windows(2) {
ctx.draw(&CanvasLine {
x1: data[0].0,