We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
usize
1 parent 8842e28 commit 633cd84Copy full SHA for 633cd84
src/libcore/str/mod.rs
@@ -1095,8 +1095,6 @@ fn eq_slice(a: &str, b: &str) -> bool {
1095
/// faster than comparing each byte in a loop.
1096
#[inline]
1097
unsafe fn cmp_slice(a: &str, b: &str, len: usize) -> i32 {
1098
- // NOTE: In theory n should be libc::size_t and not usize, but libc is not available here
1099
- #[allow(improper_ctypes)]
1100
extern { fn memcmp(s1: *const i8, s2: *const i8, n: usize) -> i32; }
1101
memcmp(a.as_ptr() as *const i8, b.as_ptr() as *const i8, len)
1102
}
0 commit comments