From 2dacece4eedc8af2ccde3be6918371293350cc4e Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Sat, 26 Apr 2025 21:06:00 -0600 Subject: Convert to rocket and morgana --- src/data/mod.rs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/data/mod.rs') diff --git a/src/data/mod.rs b/src/data/mod.rs index 1465fee..2be1f0a 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -1,13 +1,9 @@ use serde::{Deserialize, Serialize}; -#[cfg(feature = "ssr")] use tokio::sync::Mutex; use uuid::Uuid; -#[cfg(feature = "ssr")] use fs2::FileExt; -#[cfg(feature = "ssr")] use std::fs::File; -#[cfg(feature = "ssr")] use std::sync::LazyLock; use std::{collections::HashMap, path::Path, sync::Arc}; @@ -23,11 +19,9 @@ pub use page::{Page, Pages}; #[derive(Hash, PartialEq, Eq, Clone, Debug, Deserialize, Serialize)] pub struct PageUuid(Uuid); -#[cfg(feature = "ssr")] pub static CONFIG: LazyLock = LazyLock::new(|| Config::read_from_file().expect("Could not open config file")); -#[cfg(feature = "ssr")] static DATA_LOCK: LazyLock = LazyLock::new(|| { let config = &CONFIG; let lock_path = Path::join(&config.data_dir, ".lock"); @@ -53,7 +47,6 @@ static DATA_LOCK: LazyLock = LazyLock::new(|| { } }); -#[cfg(feature = "ssr")] pub struct StormscribeData { file_lock: File, data_snapshot: Mutex>, @@ -71,7 +64,6 @@ pub struct PageData { content: String, } -#[cfg(feature = "ssr")] impl StormscribeData { async fn get_snapshot() -> Arc { DATA_LOCK.data_snapshot.lock().await.clone() -- cgit 1.4.1