MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / is_true

Method is_true

src/objects/boolobject.rs:25–27  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

23 /// Gets whether this boolean is `true`.
24 #[inline]
25 pub fn is_true(&self) -> bool {
26 self.0.as_ptr() == unsafe { crate::ffi::Py_True() }
27 }
28}
29
30/// Converts a rust `bool` to a Python `bool`.

Callers

nothing calls this directly

Calls 2

Py_TrueFunction · 0.50
as_ptrMethod · 0.45

Tested by

no test coverage detected