Skip to content

Commit b3a1693

Browse files
committed
correct description for slice_iter_any
1 parent c1d5108 commit b3a1693

File tree

1 file changed

+3
-3
lines changed
  • clippy_lints/src/methods

1 file changed

+3
-3
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4287,10 +4287,10 @@ declare_clippy_lint! {
42874287

42884288
declare_clippy_lint! {
42894289
/// ### What it does
4290-
/// Checks for usage of `iter().any()` on slices of `u8` or `i8` and suggests using `contains()` instead.
4290+
/// Checks for usage of `iter().any()` on slices of `u8`/`i8` when it can be replaced with `contains()` and suggests doing so.
42914291
///
42924292
/// ### Why is this bad?
4293-
/// `iter().any()` on slices of `u8` or `i8` is optimized to use `memchr`.
4293+
/// `contains()` on slices of `u8`/`i8` is faster than `iter().any()` in such cases.
42944294
///
42954295
/// ### Example
42964296
/// ```no_run
@@ -4307,7 +4307,7 @@ declare_clippy_lint! {
43074307
#[clippy::version = "1.85.0"]
43084308
pub SLICE_ITER_ANY,
43094309
perf,
4310-
"using `contains()` instead of `iter().any()` on u8/i8 slices is more efficient"
4310+
"using `contains()` instead of `iter().any()` on `u8`/`i8` slices is more fast"
43114311
}
43124312

43134313
pub struct Methods {

0 commit comments

Comments
 (0)