Merge rust-bitcoin/rust-bitcoin#1072: Make `opcode::to_u8` a const function
0bae41129d
Make `opcode::to_u8` a const function (Matt Corallo) Pull request description: In general, if a function can be const, it should be, and this one trivially can be, so it should be. ACKs for top commit: tcharding: ACK0bae41129d
apoelstra: ACK0bae41129d
Tree-SHA512: 0df883894ec65dac1b709c581ffc3d2daca737561d05adb971dfef736e4147c59ea66cdc0520296c619e13e1dac70c07cb062b61304541cf488262244f313009
This commit is contained in:
commit
8084d6dd42
|
@ -743,7 +743,7 @@ impl All {
|
||||||
|
|
||||||
/// Encodes [`All`] as a byte.
|
/// Encodes [`All`] as a byte.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn to_u8(self) -> u8 {
|
pub const fn to_u8(self) -> u8 {
|
||||||
self.code
|
self.code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue