diff --git a/backend/src/structs.rs b/backend/src/structs.rs index 214fb7b..3fb8118 100644 --- a/backend/src/structs.rs +++ b/backend/src/structs.rs @@ -17,12 +17,12 @@ impl BingoSquare { #[derive(Deserialize)] pub struct Meta { name: String, - reason: String, + description: String, } impl Meta { - pub fn new(name: String, reason: String) -> Meta { - Meta { name, reason } + pub fn new(name: String, description: String) -> Meta { + Meta { name, description } } } @@ -35,6 +35,7 @@ pub struct BingoPool { impl fmt::Display for BingoPool { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "Name: {}\n", self.meta.name).unwrap(); + write!(f, "Description: {}\n\n", self.meta.description).unwrap(); for square in &self.squares { write!(f, "Square: {}\n", square.option).unwrap(); } diff --git a/backend/workingdir/squares/testdata/testdata.toml b/backend/workingdir/squares/testdata/testdata.toml index 8441d88..25cfbde 100644 --- a/backend/workingdir/squares/testdata/testdata.toml +++ b/backend/workingdir/squares/testdata/testdata.toml @@ -1,12 +1,12 @@ [meta] name = 'Test Bingo' -reason = 'Because its fucking funny' +description = 'Because its fucking funny' [[squares]] -option = 'This is a test square' +option = 'Code compiles first try and no one believes you' [[squares]] -option = 'This is a second test square' +option = 'There isnt a crate for that already' [[squares]] -option = 'This is a third test square' +option = 'Someone tells you to use JS'