From 9a4f9a1b7c06363791328ac977d5d4680f71efad Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 11 Sep 2023 17:09:46 +0100 Subject: [PATCH] pageserver: add a const constructor for Key, for use in test consts --- pageserver/src/repository.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pageserver/src/repository.rs b/pageserver/src/repository.rs index 047fa761c3..7a94c3449d 100644 --- a/pageserver/src/repository.rs +++ b/pageserver/src/repository.rs @@ -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,