Skip to content

Commit 1464667

Browse files
committed
Add dragon scale foil promo type
1 parent 21a59f3 commit 1464667

7 files changed

Lines changed: 8 additions & 5 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "scryfall"
3-
version = "0.18.0"
3+
version = "0.19.0"
44
authors = ["Mendess2526 <pedro.mendes.26@gmail.com>"]
55
edition = "2021"
66
description = "A wrapper around the scryfall magic the gathering api"

src/bulk.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
//!
1616
//! See also: [Official Docs](https://scryfall.com/docs/api/bulk-data)
1717
18-
use std::fs::File;
1918
use std::io::BufReader;
2019
use std::path::Path;
2120

@@ -120,12 +119,12 @@ impl<T: DeserializeOwned> BulkDataFile<T> {
120119
))
121120
}
122121

123-
async fn get_reader(&self) -> crate::Result<BufReader<File>> {
122+
async fn get_reader(&self) -> crate::Result<BufReader<std::fs::File>> {
124123
let cache_path = self.cache_path();
125124
if !cache_path.exists() {
126125
self.download(&cache_path).await?;
127126
}
128-
Ok(BufReader::new(File::open(cache_path)?))
127+
Ok(BufReader::new(std::fs::File::open(cache_path)?))
129128
}
130129

131130
async fn get_async_reader(&self) -> crate::Result<impl AsyncRead> {

src/card/promo_types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub enum PromoType {
3333
Doublerainbow,
3434
Draculaseries,
3535
Draftweekend,
36+
DragonScaleFoil,
3637
Duels,
3738
Embossed,
3839
Event,

tests/variants-feature/default_variants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ fn match_on_promo_type(f: PromoType) {
202202
PromoType::UpsideDownBack => todo!(),
203203
PromoType::Vault => todo!(),
204204
PromoType::Wizardsplaynetwork => todo!(),
205+
PromoType::DragonScaleFoil => todo!(),
205206
_ => todo!(),
206207
}
207208
}

tests/variants-feature/unknown_variants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ fn match_on_promo_type(f: PromoType) {
133133
PromoType::Doublerainbow => todo!(),
134134
PromoType::Draculaseries => todo!(),
135135
PromoType::Draftweekend => todo!(),
136+
PromoType::DragonScaleFoil => todo!(),
136137
PromoType::Duels => todo!(),
137138
PromoType::Embossed => todo!(),
138139
PromoType::Event => todo!(),

tests/variants-feature/unknown_variants_slim.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ fn match_on_promo_type(f: PromoType) {
139139
PromoType::Doublerainbow => todo!(),
140140
PromoType::Draculaseries => todo!(),
141141
PromoType::Draftweekend => todo!(),
142+
PromoType::DragonScaleFoil => todo!(),
142143
PromoType::Duels => todo!(),
143144
PromoType::Embossed => todo!(),
144145
PromoType::Event => todo!(),

0 commit comments

Comments
 (0)