MCPcopy Create free account
hub / github.com/aws/clock-bound / drop

Method drop

clock-bound/src/shm/reader.rs:41–48  ·  view source on GitHub ↗

Drop the `FdGuard` and close the file descriptor it holds.

(&mut self)

Source from the content-addressed store, hash-verified

39impl Drop for FdGuard {
40 /// Drop the `FdGuard` and close the file descriptor it holds.
41 fn drop(&mut self) {
42 // SAFETY: Unsafe because this is a call into a C API, but this particular
43 // call is always safe.
44 unsafe {
45 let ret = libc::close(self.0);
46 assert!(ret == 0 || errno() == Errno(libc::EINTR));
47 }
48 }
49}
50
51/// A guard tracking an memory mapped file.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected