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

Method get_opt

crates/vm/src/stdlib/os.rs:53–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51impl<'fd> DirFd<'fd, 1> {
52 #[inline(always)]
53 pub(crate) fn get_opt(self) -> Option<crt_fd::Borrowed<'fd>> {
54 let [fd] = self.0;
55 (fd != DEFAULT_DIR_FD).then_some(fd)
56 }
57
58 #[inline]
59 pub(crate) fn raw_opt(self) -> Option<i32> {

Callers 2

raw_optMethod · 0.80
os_openFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected