From 53bf2f070cd3ef95bbdf78e439dbeb2d8cda8f19 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 9 May 2023 12:38:55 +0200 Subject: undo sort_key() returning Cow --- src/table/util.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/table/util.rs') diff --git a/src/table/util.rs b/src/table/util.rs index 39412c79..0b10cf3f 100644 --- a/src/table/util.rs +++ b/src/table/util.rs @@ -1,5 +1,3 @@ -use std::borrow::Cow; - use serde::{Deserialize, Serialize}; use garage_util::data::*; @@ -9,8 +7,8 @@ use crate::schema::*; #[derive(Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct EmptyKey; impl SortKey for EmptyKey { - fn sort_key(&self) -> Cow<'_, [u8]> { - Cow::from(&[][..]) + fn sort_key(&self) -> &[u8] { + &[] } } impl PartitionKey for EmptyKey { -- cgit v1.2.3