kovaxis / midly

A feature-complete MIDI parser and writer focused on speed.
The Unlicense
138 stars 26 forks source link

Smf::new returns Result even though it cannot fail #5

Closed Boscop closed 4 years ago

Boscop commented 4 years ago

Smf::new returns Result even though it cannot fail.

kovaxis commented 4 years ago

Nice catch. It's a leftover from when Smf did harsher validation. Shouldn't be there anymore.

However changing it is a breaking change, and there's already been tons of breaking changes. I think I want to rethink the API one final time, remove all of the generic cruft which now only seems confusing to me, shrink the API area and pack up all breaking changes.

So, delayed for 0.5. Thanks for reporting!

kovaxis commented 4 years ago

Fixed in 0.5.

In 0.5 Smf::new creates an empty Smf structure similarly to how Vec::new works.