MCPcopy Index your code
hub / github.com/RustPython/RustPython / _read

Function _read

crates/common/src/crt_fd.rs:380–384  ·  view source on GitHub ↗
(fd: Raw, buf: &mut [u8])

Source from the content-addressed store, hash-verified

378}
379
380fn _read(fd: Raw, buf: &mut [u8]) -> io::Result<usize> {
381 let count = cmp::min(buf.len(), MAX_RW);
382 let n = cvt(unsafe { suppress_iph!(libc::read(fd, buf.as_mut_ptr() as _, count as _)) })?;
383 Ok(n as usize)
384}
385
386pub fn write(fd: Borrowed<'_>, buf: &[u8]) -> io::Result<usize> {
387 _write(fd.as_raw(), buf)

Callers 1

readFunction · 0.70

Calls 3

minFunction · 0.85
cvtFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected