aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-04-18 23:33:29 +0200
committermetamuffin <metamuffin@disroot.org>2025-04-18 23:33:29 +0200
commita123a1997f3ab527ab83b44ca18bec94883f46d0 (patch)
tree761c4f0e8e9bbb7834e59af3d6904dee39932923 /common
parent5b6fd021cc84ae7f5e1719ff398ff4627493a13c (diff)
downloadjellything-a123a1997f3ab527ab83b44ca18bec94883f46d0.tar
jellything-a123a1997f3ab527ab83b44ca18bec94883f46d0.tar.bz2
jellything-a123a1997f3ab527ab83b44ca18bec94883f46d0.tar.zst
use impl Hash for cache key instead of string
Diffstat (limited to 'common')
-rw-r--r--common/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
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,