Skip to content

Commit e4c945f

Browse files
committed
allow lint on MSRV
1 parent f3097b2 commit e4c945f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyo3-ffi/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ macro_rules! c_str {
272272
);
273273
};
274274
// SAFETY: the string is checked to not contain null bytes
275-
unsafe { ::std::ffi::CStr::from_bytes_with_nul_unchecked(concat!($s, "\0").as_bytes()) }
275+
#[allow(unsafe_op_in_unsafe_fn)] // MSRV 1.63 needs this
276+
unsafe {
277+
::std::ffi::CStr::from_bytes_with_nul_unchecked(concat!($s, "\0").as_bytes())
278+
}
276279
}};
277280
}
278281

0 commit comments

Comments
 (0)