Derive Ord and PartialOrd for CompactCacheKey

This commit is contained in:
Kevin Guthrie 2024-08-07 12:46:53 -04:00 committed by Andrew Hauck
parent 7003ac34ad
commit 24d722920a
2 changed files with 2 additions and 2 deletions

2
.bleep
View file

@ -1 +1 @@
a626a70391421eb80e6cdc6c3ceb4d16f38367e8 80970257fefa5cff505f63552dd2ae74372d501a

View file

@ -130,7 +130,7 @@ impl CacheKey {
/// Storage optimized cache key to keep in memory or in storage /// Storage optimized cache key to keep in memory or in storage
// 16 bytes + 8 bytes (+16 * u8) + user_tag.len() + 16 Bytes (Box<str>) // 16 bytes + 8 bytes (+16 * u8) + user_tag.len() + 16 Bytes (Box<str>)
#[derive(Debug, Deserialize, Serialize, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Deserialize, Serialize, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct CompactCacheKey { pub struct CompactCacheKey {
pub primary: HashBinary, pub primary: HashBinary,
// save 8 bytes for non-variance but waste 8 bytes for variance vs, store flat 16 bytes // save 8 bytes for non-variance but waste 8 bytes for variance vs, store flat 16 bytes