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:
parent
b645b6b4b5
commit
0bae41129d
|
@ -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