aboutsummaryrefslogtreecommitdiff
path: root/database
diff options
context:
space:
mode:
Diffstat (limited to 'database')
-rw-r--r--database/Cargo.toml3
-rw-r--r--database/src/lib.rs6
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>