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

Function _write

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

Source from the content-addressed store, hash-verified

372}
373
374fn _write(fd: Raw, buf: &[u8]) -> io::Result<usize> {
375 let count = cmp::min(buf.len(), MAX_RW);
376 let n = cvt(unsafe { suppress_iph!(c::write(fd, buf.as_ptr() as _, count as _)) })?;
377 Ok(n as usize)
378}
379
380fn _read(fd: Raw, buf: &mut [u8]) -> io::Result<usize> {
381 let count = cmp::min(buf.len(), MAX_RW);

Callers 1

writeFunction · 0.85

Calls 3

minFunction · 0.85
cvtFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected