From a123a1997f3ab527ab83b44ca18bec94883f46d0 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 18 Apr 2025 23:33:29 +0200 Subject: use impl Hash for cache key instead of string --- common/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common/src') diff --git a/common/src/lib.rs b/common/src/lib.rs index 003a798..f413d97 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -21,7 +21,7 @@ use std::{ path::PathBuf, }; -#[derive(Clone, Copy, Debug, Encode, Decode, PartialEq, Eq, PartialOrd, Ord)] +#[derive(Clone, Copy, Debug, Encode, Decode, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct NodeID(pub [u8; 32]); pub enum NodeIDOrSlug { @@ -238,7 +238,7 @@ pub enum SourceTrackKind { Subtitles, } -#[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Encode, Decode)] +#[derive(Debug, Serialize, Deserialize, Clone, Copy, Hash, PartialEq, Encode, Decode)] #[serde(rename_all = "snake_case")] pub enum TraktKind { Movie, @@ -249,7 +249,7 @@ pub enum TraktKind { User, } -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, Hash, Serialize, Deserialize)] pub enum TmdbKind { Tv, Movie, -- cgit v1.2.3-70-g09d2