From e0ce6a22b1eb3117c0510629e5aad5c917e1c5bb Mon Sep 17 00:00:00 2001 From: Pavel Perestoronin Date: Thu, 20 Apr 2023 01:24:07 +0200 Subject: [PATCH] Opt: add the docstrings and TODO --- src/models/battle_results.rs | 2 ++ src/models/battle_results_dat.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/models/battle_results.rs b/src/models/battle_results.rs index dc4378d..e04c9d5 100644 --- a/src/models/battle_results.rs +++ b/src/models/battle_results.rs @@ -15,6 +15,8 @@ impl BattleResults { } /// Parsed battle results. +/// +/// TODO: 150[0].21[0].8[0].801[0].unsigned is arena end time. #[derive(Message, Serialize)] pub struct BattleResults { /// Battle timestamp. diff --git a/src/models/battle_results_dat.rs b/src/models/battle_results_dat.rs index d6c5cbe..973a92a 100644 --- a/src/models/battle_results_dat.rs +++ b/src/models/battle_results_dat.rs @@ -21,6 +21,9 @@ pub struct BattleResultsDat( impl BattleResultsDat { /// Parses the pickled structure from the reader which contains `battle_results.dat`. + /// + /// It can be used either on the `battle_results.dat` for a replay archive, + /// or directly on `**/DAVAProject/battle_results/*/*_full.dat`. pub fn from_reader(reader: impl Read) -> Result { serde_pickle::from_reader(reader, Default::default()).map_err(Error::UnpickleFailed) }