klingtnet / rosc

An OSC library for Rust.
Apache License 2.0
173 stars 25 forks source link

Decoder methods wrap OscError in nom Err enum #30

Closed DrLuke closed 2 years ago

DrLuke commented 2 years ago

I've just noticed that the decode_udp method straight up returns the nom Err wrapping the OscError.

This means that you have to add nom as a dependency to your project if you want to get the OscError (example).

I think this is an unnecessary leaky abstraction, we should instead return a Result<(&[u8], OscPacket), OscError> on the decode methods.