upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-01 14:31:32 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-01 15:22:38 +0000
commitd2ac69816567f092fe0d4661723bc43778cb481b (patch)
treee8b51b61a6a7b0ab1a214adebe4e237143b01f0b /src/config.rs
parent7a78815e29b01c83f3d0ec195ba717a2eba8cd37 (diff)
fix cargo clippy and fmt warnings
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/config.rs b/src/config.rs
index f04b7d8..9b0d0b8 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -5,8 +5,10 @@ use std::env;
5/// Database backend type for the relay 5/// Database backend type for the relay
6#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] 6#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
7#[serde(rename_all = "lowercase")] 7#[serde(rename_all = "lowercase")]
8#[derive(Default)]
8pub enum DatabaseBackend { 9pub enum DatabaseBackend {
9 /// In-memory database (default, fastest, no persistence) 10 /// In-memory database (default, fastest, no persistence)
11 #[default]
10 Memory, 12 Memory,
11 /// NostrDB backend (persistent, optimized for Nostr) 13 /// NostrDB backend (persistent, optimized for Nostr)
12 NostrDb, 14 NostrDb,
@@ -14,12 +16,6 @@ pub enum DatabaseBackend {
14 Lmdb, 16 Lmdb,
15} 17}
16 18
17impl Default for DatabaseBackend {
18 fn default() -> Self {
19 Self::Memory
20 }
21}
22
23impl std::str::FromStr for DatabaseBackend { 19impl std::str::FromStr for DatabaseBackend {
24 type Err = anyhow::Error; 20 type Err = anyhow::Error;
25 21