Make `opcode::to_u8` a const function

In general, if a function can be const, it should be, and this one
trivially can be, so it should be.
This commit is contained in:
Matt Corallo 2022-06-28 17:48:31 +00:00
parent b645b6b4b5
commit 0bae41129d
1 changed files with 1 additions and 1 deletions

View File

@ -743,7 +743,7 @@ impl All {
/// Encodes [`All`] as a byte.
#[inline]
pub fn to_u8(self) -> u8 {
pub const fn to_u8(self) -> u8 {
self.code
}
}