summary refs log tree commit diff
path: root/src/data/mod.rs
diff options
context:
space:
mode:
authorAshelyn Rose <git@ashen.earth>2025-04-26 21:06:00 -0600
committerAshelyn Rose <git@ashen.earth>2025-04-26 21:06:00 -0600
commit2dacece4eedc8af2ccde3be6918371293350cc4e (patch)
tree81364da50cad615cd387f38d1abcc62102939033 /src/data/mod.rs
parent619373a261ad18c51cd09bc61d116f585c8295ec (diff)
Convert to rocket and morgana no-leptos
Diffstat (limited to 'src/data/mod.rs')
-rw-r--r--src/data/mod.rs8
1 files changed, 0 insertions, 8 deletions
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<Config> =
     LazyLock::new(|| Config::read_from_file().expect("Could not open config file"));
 
-#[cfg(feature = "ssr")]
 static DATA_LOCK: LazyLock<StormscribeData> = LazyLock::new(|| {
     let config = &CONFIG;
     let lock_path = Path::join(&config.data_dir, ".lock");
@@ -53,7 +47,6 @@ static DATA_LOCK: LazyLock<StormscribeData> = LazyLock::new(|| {
     }
 });
 
-#[cfg(feature = "ssr")]
 pub struct StormscribeData {
     file_lock: File,
     data_snapshot: Mutex<Arc<DataSnapshot>>,
@@ -71,7 +64,6 @@ pub struct PageData {
     content: String,
 }
 
-#[cfg(feature = "ssr")]
 impl StormscribeData {
     async fn get_snapshot() -> Arc<DataSnapshot> {
         DATA_LOCK.data_snapshot.lock().await.clone()