Skip to content

Commit 7111a43

Browse files
NopenopNoah Campise
andauthored
add tlr format (#64)
Co-authored-by: Noah Campise <noahcampise@Noahs-MacBook-Pro.local>
1 parent be0b58b commit 7111a43

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/card.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ pub struct CardLegality {
117117
pub standard_brawl: Legality,
118118
#[serde(default, rename = "historicbrawl")]
119119
pub historic_brawl: Legality,
120+
#[serde(default)]
121+
pub tlr: Legality,
120122
}
121123

122124
impl Index<Format> for CardLegality {
@@ -147,6 +149,7 @@ impl Index<Format> for CardLegality {
147149
Format::Timeless => &self.timeless,
148150
Format::StandardBrawl => &self.standard_brawl,
149151
Format::HistoricBrawl => &self.historic_brawl,
152+
Format::TLR => &self.tlr,
150153
}
151154
}
152155
}
@@ -177,6 +180,7 @@ impl IndexMut<Format> for CardLegality {
177180
Format::Timeless => &mut self.timeless,
178181
Format::StandardBrawl => &mut self.standard_brawl,
179182
Format::HistoricBrawl => &mut self.historic_brawl,
183+
Format::TLR => &mut self.tlr,
180184
}
181185
}
182186
}

src/format.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ pub enum Format {
3030
Timeless,
3131
StandardBrawl,
3232
HistoricBrawl,
33+
TLR,
3334
}
3435

3536
impl fmt::Display for Format {
@@ -62,6 +63,7 @@ impl fmt::Display for Format {
6263
Timeless => "timeless",
6364
StandardBrawl => "standardbrawl",
6465
HistoricBrawl => "historicbrawl",
66+
TLR => "tlr",
6567
}
6668
)
6769
}

0 commit comments

Comments
 (0)