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

Method fmt

src/kernel_sigset.rs:98–113  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter<'_>)

Source from the content-addressed store, hash-verified

96
97impl fmt::Debug for KernelSigSet {
98 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
99 let mut d = f.debug_set();
100
101 // Surprisingly, `_NSIG` is inclusive.
102 for i in 1..=_NSIG {
103 // SAFETY: This value is non-zero, in range, and only used for
104 // debug output.
105 let sig = unsafe { Signal::from_raw_unchecked(i as _) };
106
107 if self.contains(sig) {
108 d.entry(&sig);
109 }
110 }
111
112 d.finish()
113 }
114}
115
116#[cfg(test)]

Callers

nothing calls this directly

Calls 1

containsMethod · 0.80

Tested by

no test coverage detected