mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-24 03:39:49 +02:00
New: impl TryInto<BattleResults> for BattleResultsDat
This commit is contained in:
1 parent
cd933f6584
commit
04420da334
1 file changed
+8
@@ -30,3 +30,11 @@ impl BattleResultsDat {
|
|||||||
BattleResults::decode(self.1.as_ref()).map_err(Error::DecodeFailed)
|
BattleResults::decode(self.1.as_ref()).map_err(Error::DecodeFailed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl TryInto<BattleResults> for BattleResultsDat {
|
||||||
|
type Error = Error;
|
||||||
|
|
||||||
|
fn try_into(self) -> Result<BattleResults> {
|
||||||
|
self.decode_battle_results()
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user