From 2964a01d73fbc9cf9591f4f392786788e35ca909 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Sun, 3 Mar 2024 11:05:08 -0500 Subject: [PATCH] Enable `clippy::identity_op` (#8773) This PR enables the [`clippy::identity_op`](https://rust-lang.github.io/rust-clippy/master/index.html#/identity_op) rule and fixes the outstanding violations. Release Notes: - N/A --- crates/languages/src/ocaml.rs | 2 +- tooling/xtask/src/main.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/languages/src/ocaml.rs b/crates/languages/src/ocaml.rs index f355bcb965..0dc4bfcd2b 100644 --- a/crates/languages/src/ocaml.rs +++ b/crates/languages/src/ocaml.rs @@ -140,7 +140,7 @@ impl LspAdapter for OCamlLspAdapter { } let mut label_highlight = vec![( - 0..0 + label.len(), + 0..label.len(), language.grammar()?.highlight_id_for_name("property")?, )]; diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rs index 72c1588fe7..a83ae283ad 100644 --- a/tooling/xtask/src/main.rs +++ b/tooling/xtask/src/main.rs @@ -90,7 +90,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> { "clippy::derive_ord_xor_partial_ord", "clippy::eq_op", "clippy::explicit_counter_loop", - "clippy::identity_op", "clippy::implied_bounds_in_impls", "clippy::iter_kv_map", "clippy::iter_overeager_cloned",