diff --git a/froxy-scraper/src/lib.rs b/froxy-scraper/src/lib.rs index 916b95a..3967db7 100644 --- a/froxy-scraper/src/lib.rs +++ b/froxy-scraper/src/lib.rs @@ -1,5 +1,5 @@ #![allow(dead_code)] -pub mod types; -pub mod state; pub mod parsing; +pub mod state; +pub mod types; diff --git a/froxy-templates/examples/index.rs b/froxy-templates/examples/index.rs index bbdafe4..8386b9e 100644 --- a/froxy-templates/examples/index.rs +++ b/froxy-templates/examples/index.rs @@ -66,8 +66,8 @@ fn main() { .to_vec(), }, }, - ), -( + ), + ( SmolStr::new_static("F3"), ClusterData { users: 80, @@ -75,56 +75,13 @@ fn main() { dead_pc: 1, silent: false, piscine: false, - issues: [ - (SmolStr::new_static("F1r1s1"), PcIssue::Dead), - (SmolStr::new_static("F1r2s1"), PcIssue::Attention), - ] - .into_iter() - .collect(), + issues: Default::default(), map: index::Map { - rows: [ - index::MapRow { - range: SmolStr::new_static("R1"), - col: [ - MapPos::Empty, - MapPos::Flex, - MapPos::Wall, - MapPos::Door, - MapPos::Empty, - ] - .to_vec(), - }, - index::MapRow { - range: SmolStr::new_static("R2"), - col: [ - MapPos::Empty, - MapPos::Flex, - MapPos::Pc(SmolStr::new_static("F1r1s1")), - MapPos::Pc(SmolStr::new_static("F1r2s1")), - MapPos::Pc(SmolStr::new_static("F1r3s1")), - MapPos::Pc(SmolStr::new_static("F1r4s1")), - MapPos::Pc(SmolStr::new_static("F1r5s1")), - MapPos::Empty, - ] - .to_vec(), - }, - index::MapRow { - range: SmolStr::new_static("R3"), - col: [ - MapPos::Empty, - MapPos::Flex, - MapPos::Wall, - MapPos::Door, - MapPos::Empty, - ] - .to_vec(), - }, - ] - .to_vec(), + rows: Vec::new(), }, }, ), -( + ( SmolStr::new_static("F2"), ClusterData { users: 180, @@ -132,56 +89,12 @@ fn main() { dead_pc: 1, silent: true, piscine: true, - issues: [ - (SmolStr::new_static("F1r1s1"), PcIssue::Dead), - (SmolStr::new_static("F1r2s1"), PcIssue::Attention), - ] - .into_iter() - .collect(), + issues: Default::default(), map: index::Map { - rows: [ - index::MapRow { - range: SmolStr::new_static("R1"), - col: [ - MapPos::Empty, - MapPos::Flex, - MapPos::Wall, - MapPos::Door, - MapPos::Empty, - ] - .to_vec(), - }, - index::MapRow { - range: SmolStr::new_static("R2"), - col: [ - MapPos::Empty, - MapPos::Flex, - MapPos::Pc(SmolStr::new_static("F1r1s1")), - MapPos::Pc(SmolStr::new_static("F1r2s1")), - MapPos::Pc(SmolStr::new_static("F1r3s1")), - MapPos::Pc(SmolStr::new_static("F1r4s1")), - MapPos::Pc(SmolStr::new_static("F1r5s1")), - MapPos::Empty, - ] - .to_vec(), - }, - index::MapRow { - range: SmolStr::new_static("R3"), - col: [ - MapPos::Empty, - MapPos::Flex, - MapPos::Wall, - MapPos::Door, - MapPos::Empty, - ] - .to_vec(), - }, - ] - .to_vec(), + rows: Vec::new(), }, }, - ) - ]), + )]), locations: [(SmolStr::new_static("F1r5s1"), LocationData { login: "maiboyer".into(), image: "https://friends.42paris.fr/proxy/resize/512/03c61af252becbca11aac5ff49a2e61c/maiboyer.jpg".into(), diff --git a/froxy-templates/src/lib.rs b/froxy-templates/src/lib.rs index 74d11e1..9455194 100644 --- a/froxy-templates/src/lib.rs +++ b/froxy-templates/src/lib.rs @@ -3,7 +3,7 @@ mod templates; pub mod friends; +pub mod index; pub mod meta_template; pub mod open_modal; pub mod profile; -pub mod index;