You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for sharing your code - it was a good way to get some data from the F1 game quickly. I've bumped into some issues when using/testing the library, described below. Regards (or Groetjes? : ) -Harry
The ? operator here causes issues when driving in single-player, as there may not be 22 participants available? This is reproducible in F2 single-player time-trial mode:
I've had other occurances of .unwrap or ? behaviour causing issues in data-parsing when not as expected, for example in FinalClassification TyreCompounds (in F1 race, Barcelona with default race setup iirc):
Thanks for sharing your code - it was a good way to get some data from the F1 game quickly. I've bumped into some issues when using/testing the library, described below. Regards (or Groetjes? : ) -Harry
The
?
operator here causes issues when driving in single-player, as there may not be 22 participants available? This is reproducible in F2 single-player time-trial mode:F1-2022-telemetry-rust/src/models/participant.rs
Lines 62 to 66 in bd85423
Refactoring to a
if let Some()
andvec::push()
of the result might be a nice solution?I've had other occurances of
.unwrap
or?
behaviour causing issues in data-parsing when not as expected, for example in FinalClassification TyreCompounds (in F1 race, Barcelona with default race setup iirc):F1-2022-telemetry-rust/src/models/final_classification.rs
Lines 44 to 46 in bd85423
Similar code refactors to avoid
?
here (and in other places in the library) would make it more "error resistant".The text was updated successfully, but these errors were encountered: