Use Cow<[u8]> for sort keys

This commit is contained in:
Alex Auvolat
2023-04-27 16:14:44 +02:00
parent ea3bfd2ab1
commit 6005491cd8
3 changed files with 12 additions and 10 deletions
+1 -3
View File
@@ -347,9 +347,7 @@ impl<F: TableSchema, R: TableReplication> TableData<F, R> {
// ---- Utility functions ----
pub fn tree_key(&self, p: &F::P, s: &F::S) -> Vec<u8> {
let mut ret = p.hash().to_vec();
ret.extend(s.sort_key());
ret
[p.hash().as_slice(), s.sort_key().as_ref()].concat()
}
pub fn decode_entry(&self, bytes: &[u8]) -> Result<F::E, Error> {