MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / main

Function main

14_context_manager/rust/context_manager.rs:36–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36fn main() -> io::Result<()> {
37 let mut fm = FileManager::new("test.txt", 'w');
38 fm.with(|f| -> io::Result<()> {
39 f.write(b"Test")?;
40 Ok(())
41 })?;
42 println!("{}", fm.closed());
43 Ok(())
44}

Callers

nothing calls this directly

Calls 1

withMethod · 0.80

Tested by

no test coverage detected