stadelmanma / fitparse-rs

Rust library to parse FIT formatted files
MIT License
54 stars 10 forks source link

Try and remove `.pop().unwrap()` logic from component expansion #24

Closed stadelmanma closed 1 year ago

stadelmanma commented 1 year ago

Right now component expansion returns a vector and then I pop+unwrap the components in reverse order to avoid cloning the values again. It would be better if we could just return a variable length tuple like nom does, maybe we could even use nom directly since it's already a runtime dependency?

The pop+unwrap should never panic because the vector returned has the exact same number of items but still not fan.

stadelmanma commented 1 year ago

fixed in 1141394