mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-25 09:00:37 +00:00
pageserver: add a const constructor for Key, for use in test consts
This commit is contained in:
@@ -37,7 +37,7 @@ impl Key {
|
||||
| self.field6 as i128
|
||||
}
|
||||
|
||||
pub fn from_i128(x: i128) -> Self {
|
||||
pub const fn from_i128(x: i128) -> Self {
|
||||
Key {
|
||||
field1: ((x >> 120) & 0xf) as u8,
|
||||
field2: ((x >> 104) & 0xFFFF) as u32,
|
||||
|
||||
Reference in New Issue
Block a user