Skip to content

Commit

Permalink
Merge pull request #75 from artichoke/lopopolo/stable-clippy-lint
Browse files Browse the repository at this point in the history
Address `clippy::redundant_pattern_matching` lint violation
  • Loading branch information
lopopolo authored Sep 1, 2023
2 parents 9cb361d + 29fefe9 commit d8e28d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit d8e28d6

Please sign in to comment.