fixed torn->competition
This commit is contained in:
parent
0d780e91a1
commit
9e895a97bf
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "torn-api"
|
||||
version = "0.5.19"
|
||||
version = "0.5.20"
|
||||
edition = "2021"
|
||||
authors = ["Pyrit [2111649]"]
|
||||
license = "MIT"
|
||||
|
|
|
@ -43,6 +43,7 @@ pub struct EliminationLeaderboard {
|
|||
|
||||
pub enum Competition {
|
||||
Elimination { teams: Vec<EliminationLeaderboard> },
|
||||
Unkown(String),
|
||||
}
|
||||
|
||||
fn decode_competition<'de, D>(deserializer: D) -> Result<Option<Competition>, D::Error>
|
||||
|
@ -98,7 +99,7 @@ where
|
|||
teams: teams.ok_or_else(|| de::Error::missing_field("teams"))?,
|
||||
})),
|
||||
"" => Ok(None),
|
||||
v => Err(de::Error::unknown_variant(v, &["Elimination", ""])),
|
||||
v => Ok(Some(Competition::Unkown(v.to_owned()))),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue