diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-11-29 13:32:52 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-11-29 13:32:52 +0100 |
| commit | 5db15c323d76dca9ae71b0204d63dcb09fbbcbc5 (patch) | |
| tree | 4f69e58c9b6825b7b602712893950673abf9c286 /database | |
| parent | bac47e456085ea153ae6ae1b1e28e41868693c9c (diff) | |
| download | jellything-5db15c323d76dca9ae71b0204d63dcb09fbbcbc5.tar jellything-5db15c323d76dca9ae71b0204d63dcb09fbbcbc5.tar.bz2 jellything-5db15c323d76dca9ae71b0204d63dcb09fbbcbc5.tar.zst | |
remove asset token; db json
Diffstat (limited to 'database')
| -rw-r--r-- | database/Cargo.toml | 3 | ||||
| -rw-r--r-- | database/src/lib.rs | 6 |
2 files changed, 1 insertions, 8 deletions
diff --git a/database/Cargo.toml b/database/Cargo.toml index c5bfc9d..19f632a 100644 --- a/database/Cargo.toml +++ b/database/Cargo.toml @@ -11,6 +11,3 @@ log = { workspace = true } serde_json = "1.0.145" redb = "3.1.0" anyhow = "1.0.100" - -[features] -db_json = [] diff --git a/database/src/lib.rs b/database/src/lib.rs index fe43ad4..90f596e 100644 --- a/database/src/lib.rs +++ b/database/src/lib.rs @@ -13,11 +13,9 @@ use jellycommon::{ use log::info; use redb::{Durability, ReadableDatabase, ReadableTable, StorageError, TableDefinition}; use search::NodeTextSearchIndex; -#[cfg(not(feature = "db_json"))] use serde::{Serialize, de::DeserializeOwned}; use std::{ fs::create_dir_all, - hash::{DefaultHasher, Hasher}, path::{Path, PathBuf}, str::FromStr, sync::Arc, @@ -197,7 +195,7 @@ impl Database { for parent in &node.parents { t_node_children.insert((parent.0, id.0), ())?; } - for (pl, eid) in &node.identifiers.0 { + for (pl, eid) in &node.identifiers { t_node_external_id.insert((pl.to_string().as_str(), eid.as_str()), id.0)?; } for tag in &node.tags { @@ -468,9 +466,7 @@ impl Database { } #[derive(Debug)] -#[cfg(not(feature = "db_json"))] pub struct Ser<T>(pub T); -#[cfg(not(feature = "db_json"))] impl<T: DeserializeOwned + Serialize + std::fmt::Debug> redb::Value for Ser<T> { type SelfType<'a> = Ser<T> |