From 29fefe9a8e8b4fdeb05e970115652befe0436c08 Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Fri, 1 Sep 2023 16:02:44 -0700 Subject: [PATCH] Address `clippy::redundant_pattern_matching` lint violation --- src/imp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imp.rs b/src/imp.rs index 27c97b4..5709eef 100644 --- a/src/imp.rs +++ b/src/imp.rs @@ -23,7 +23,7 @@ pub const fn is_cstr(slice: &[u8]) -> bool { // Returns true if the slice contains any NUL bytes. #[must_use] pub const fn contains_nul(slice: &[u8]) -> bool { - matches!(find(slice, 0), Some(_)) + find(slice, 0).is_some() } #[cfg(test)]