New: impl TryInto<BattleResults> for BattleResultsDat

This commit is contained in:
eigenein committed 2023-04-16 23:05:41 +02:00
1 parent cd933f6584
commit 04420da334
1 file changed
+8
+8
View File
@@ -30,3 +30,11 @@ impl BattleResultsDat {
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()
}
}