demoparser icon indicating copy to clipboard operation
demoparser copied to clipboard

Considerations to improve the rust code

Open Lol3rrr opened this issue 5 months ago • 1 comments

Hey, just wanna start this issue with saying that reading trough this repo and the code, really helped me work on my own parser implementation and gaining somewhat of an understanding of the structure of demo files. However I noticed some patterns that are not very "rusty" and make the code harder to read IMO, would you be open to accepting a PR with some improvements in this area?

Examples

  • In the first pass sendtables file the get_propinfo function could early return in/after the first match and then not need the conditional further down.
  • this condition could be moved into the match above

Lol3rrr avatar Sep 20 '24 19:09 Lol3rrr