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

Function get_fd_mut

crates/stdlib/src/select.rs:415–417  ·  view source on GitHub ↗
(fds: &mut [pollfd], fd: i32)

Source from the content-addressed store, hash-verified

413 }
414
415 fn get_fd_mut(fds: &mut [pollfd], fd: i32) -> Option<&mut pollfd> {
416 search(fds, fd).ok().map(move |i| &mut fds[i])
417 }
418
419 fn remove_fd(fds: &mut Vec<pollfd>, fd: i32) -> Option<pollfd> {
420 search(fds, fd).ok().map(|i| fds.remove(i))

Callers 1

modifyMethod · 0.85

Calls 3

okMethod · 0.80
searchFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected