From 0b61a75afca0c9f32843eb07eeb3427693c45caa Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Wed, 2 Oct 2024 21:58:45 -0400 Subject: [PATCH] Add lint against string slicing These are tricky as it panics if the slice doesn't hit a UTF-8 codepoint boundary. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index d0c91a30..facd5a6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -245,6 +245,7 @@ range_plus_one = "deny" redundant_closure_for_method_calls = "deny" redundant_else = "deny" string_add_assign = "deny" +string_slice = "deny" unchecked_duration_subtraction = "deny" uninlined_format_args = "deny" unnecessary_box_returns = "deny"