diff options
Diffstat (limited to 'src/table/util.rs')
-rw-r--r-- | src/table/util.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/table/util.rs b/src/table/util.rs index 0b10cf3f..39412c79 100644 --- a/src/table/util.rs +++ b/src/table/util.rs @@ -1,3 +1,5 @@ +use std::borrow::Cow; + use serde::{Deserialize, Serialize}; use garage_util::data::*; @@ -7,8 +9,8 @@ use crate::schema::*; #[derive(Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct EmptyKey; impl SortKey for EmptyKey { - fn sort_key(&self) -> &[u8] { - &[] + fn sort_key(&self) -> Cow<'_, [u8]> { + Cow::from(&[][..]) } } impl PartitionKey for EmptyKey { |