Skip to content

Commit 05d41c1

Browse files
committed
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.
1 parent 48cc8c1 commit 05d41c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/blockdata/opcodes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ impl All {
743743

744744
/// Encodes [`All`] as a byte.
745745
#[inline]
746-
pub fn to_u8(self) -> u8 {
746+
pub const fn to_u8(self) -> u8 {
747747
self.code
748748
}
749749
}

0 commit comments

Comments
 (0)