Skip to content

Commit 76ed428

Browse files
authored
Fix clippy::manual_contains (#613)
1 parent 0428d50 commit 76ed428

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backends/use_file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn fill_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error> {
5858
// TODO: Move `path` to `CStr` and use `CStr::from_bytes_until_nul` (MSRV 1.69)
5959
// or C-string literals (MSRV 1.77) for statics
6060
fn open_readonly(path: &[u8]) -> Result<libc::c_int, Error> {
61-
assert!(path.iter().any(|&b| b == 0));
61+
assert!(path.contains(&0));
6262
loop {
6363
let fd = unsafe {
6464
libc::open(

0 commit comments

Comments
 (0)