MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / test_try_close

Function test_try_close

tests/io/close.rs:24–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22#[cfg(all(feature = "try_close", any(unix, target_os = "wasi")))]
23#[test]
24fn test_try_close() {
25 let file = std::fs::File::open("Cargo.toml").unwrap();
26 let raw = file.into_raw_fd();
27 unsafe {
28 rustix::io::try_close(raw).unwrap();
29 }
30}

Callers

nothing calls this directly

Calls 3

openFunction · 0.50
try_closeFunction · 0.50
into_raw_fdMethod · 0.45

Tested by

no test coverage detected