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

Method close

crates/vm/src/stdlib/os.rs:923–926  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

921 impl ScandirIterator {
922 #[pymethod]
923 fn close(&self) {
924 let entryref: &mut Option<fs::ReadDir> = &mut self.entries.write();
925 let _dropped = entryref.take();
926 }
927
928 #[pymethod]
929 const fn __enter__(zelf: PyRef<Self>) -> PyRef<Self> {

Callers 2

__exit__Method · 0.45
delMethod · 0.45

Calls 3

writeMethod · 0.45
takeMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected