From 234b9e996ad092bf0e99978c9d0b3a9e2a4b20c3 Mon Sep 17 00:00:00 2001 From: Agahnim Date: Wed, 25 Mar 2026 15:53:26 +0100 Subject: [PATCH] global: remove useless file and change comment to be more accurate --- src/main.rs | 2 +- src/state.rs | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 src/state.rs diff --git a/src/main.rs b/src/main.rs index 16805bf..f1b890e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,7 +20,7 @@ async fn main() { .fallback(notfound) .with_state(state); - // We need to include this flag so that the live reload layer isn't included when the server is built + // We need to include this flag so that the live reload layer isn't included when the server is deployed #[cfg(debug_assertions)] let app = app.layer(LiveReloadLayer::new()); diff --git a/src/state.rs b/src/state.rs deleted file mode 100644 index b22820d..0000000 --- a/src/state.rs +++ /dev/null @@ -1,21 +0,0 @@ -pub struct AppState { - mp_tracks: Vec, - p_tracks: Vec, -} - -impl AppState { - async fn try_new() -> Self { - Self { - mp_tracks: serde_json::from_str( - &std::fs::read_to_string("content/mp-tracks.json") - .expect("mp-tracks.json non trouvé"), - ) - .expect("JSON invalide"), - p_tracks: serde_json::from_str( - &std::fs::read_to_string("content/p-tracks.json") - .expect("p-tracks.json non trouvé"), - ) - .expect("JSON invalide"), - } - } -}