MCPcopy Create free account
hub / github.com/RustCrypto/utils / and

Method and

ctutils/src/choice.rs:34–44  ·  view source on GitHub ↗
(self, rhs: Choice)

Source from the content-addressed store, hash-verified

32 #[inline]
33 #[must_use]
34 pub const fn and(self, rhs: Choice) -> Choice {
35 #[cfg(all(target_arch = "arm", not(target_has_atomic = "ptr")))]
36 {
37 // Keep loop-carried predicates from becoming a short-circuiting boolean.
38 Self(self.to_u8() & rhs.to_u8())
39 }
40 #[cfg(not(all(target_arch = "arm", not(target_has_atomic = "ptr"))))]
41 {
42 Self(self.0 & rhs.0)
43 }
44 }
45
46 /// Apply an `or` conditional to the given [`Choice`]s.
47 #[inline]

Callers 1

bitandMethod · 0.45

Calls 1

to_u8Method · 0.80

Tested by

no test coverage detected