From 3235c8bc9fa0c64db46a69a39bfb9b3458f0afd0 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 18 Nov 2024 20:11:16 +0000 Subject: [PATCH] refactor: forbid clippy::indexing_slicing It is impossible to allow this in the new code now. --- deltachat-contact-tools/src/lib.rs | 2 +- deltachat-jsonrpc/src/lib.rs | 1 + format-flowed/src/lib.rs | 1 + src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deltachat-contact-tools/src/lib.rs b/deltachat-contact-tools/src/lib.rs index e8ca3da3c3..4a6e5b037d 100644 --- a/deltachat-contact-tools/src/lib.rs +++ b/deltachat-contact-tools/src/lib.rs @@ -15,7 +15,7 @@ clippy::explicit_into_iter_loop, clippy::cloned_instead_of_copied )] -#![cfg_attr(not(test), warn(clippy::indexing_slicing))] +#![cfg_attr(not(test), forbid(clippy::indexing_slicing))] #![allow( clippy::match_bool, clippy::mixed_read_write_in_expression, diff --git a/deltachat-jsonrpc/src/lib.rs b/deltachat-jsonrpc/src/lib.rs index eb633cbd3f..912a6883a7 100644 --- a/deltachat-jsonrpc/src/lib.rs +++ b/deltachat-jsonrpc/src/lib.rs @@ -1,4 +1,5 @@ #![recursion_limit = "256"] +#![cfg_attr(not(test), forbid(clippy::indexing_slicing))] pub mod api; pub use yerpc; diff --git a/format-flowed/src/lib.rs b/format-flowed/src/lib.rs index 10f9400b55..055dd66778 100644 --- a/format-flowed/src/lib.rs +++ b/format-flowed/src/lib.rs @@ -8,6 +8,7 @@ //! is assumed to be set to "no". //! //! For received messages, DelSp parameter is honoured. +#![cfg_attr(not(test), forbid(clippy::indexing_slicing))] /// Wraps line to 72 characters using format=flowed soft breaks. /// diff --git a/src/lib.rs b/src/lib.rs index 2c35c8389b..7124bd5eb2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ clippy::explicit_into_iter_loop, clippy::cloned_instead_of_copied )] -#![cfg_attr(not(test), warn(clippy::indexing_slicing))] +#![cfg_attr(not(test), forbid(clippy::indexing_slicing))] #![allow( clippy::match_bool, clippy::mixed_read_write_in_expression,