global: remove useless file and change comment to be more accurate

This commit is contained in:
Agahnim 2026-03-25 15:53:26 +01:00
parent 77a9362425
commit 6f8533f91b
Signed by: Agahnim
SSH key fingerprint: SHA256:Zj65PJnE0dRYye8Ltk/qDglynyXUxJngQ9qqx/VI+b4
2 changed files with 1 additions and 22 deletions

View file

@ -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());

View file

@ -1,21 +0,0 @@
pub struct AppState {
mp_tracks: Vec<Track>,
p_tracks: Vec<Track>,
}
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"),
}
}
}