From 923989d1a8b5f1967a4594e61d3a64e95008e64a Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Thu, 3 Nov 2022 22:18:56 -0700 Subject: [PATCH] clippy fixes --- src/diff/graph.rs | 2 +- src/main.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/diff/graph.rs b/src/diff/graph.rs index 26365e1f9..9f62e76f0 100644 --- a/src/diff/graph.rs +++ b/src/diff/graph.rs @@ -377,7 +377,7 @@ fn allocate_if_new<'syn, 'b>( // nestings for each syntax node pair. if let Some(allocated) = existing.last() { if existing.len() >= 2 { - return *allocated; + return allocated; } } diff --git a/src/main.rs b/src/main.rs index df889c4c1..8a69c208d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,9 @@ // Has false positives on else if chains that sometimes have the same // body for readability. #![allow(clippy::if_same_then_else)] +// Purely stylistic, and ignores whether there are explanatory +// comments in the if/else. +#![allow(clippy::bool_to_int_with_if)] mod constants; mod diff;