Changed reason to description
This commit is contained in:
parent
2e1231e9d9
commit
4aaa6601c2
@ -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();
|
||||
}
|
||||
|
||||
@ -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'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user