Remove unnecessary qualification from size_of

Closes #12339
This commit is contained in:
xtqqczze
2026-01-17 01:04:45 +00:00
committed by Johannes Altmanninger
parent 66ea0f78be
commit 9dfb5705c5
5 changed files with 6 additions and 12 deletions

View File

@@ -420,8 +420,7 @@ pub fn read_once(fd: RawFd, buffer: &mut MutexGuard<'_, SeparatedBuffer>) -> isi
// We want to swallow EINTR only; in particular EAGAIN needs to be returned back to the caller.
let amt = loop {
let amt =
unsafe { libc::read(fd, bytes.as_mut_ptr().cast(), std::mem::size_of_val(&bytes)) };
let amt = unsafe { libc::read(fd, bytes.as_mut_ptr().cast(), size_of_val(&bytes)) };
if amt < 0 && errno::errno().0 == EINTR {
continue;
}