openrr / urdf-rs

URDF parser for Rust
Apache License 2.0
30 stars 11 forks source link

Reduce public dependencies #9

Closed taiki-e closed 3 years ago

taiki-e commented 3 years ago

Hiding error variants from a library's public error type to prevent dependency updates from becoming breaking changes. We can add UrdfErrorKind enum or is_* methods that indicate the kind of error if needed, but don't expose dependencies' types directly in the public API.

This reduces public dependencies from 3 (serde, serde-xml-rs, RustyXML) to 1 (serde).

Refs: https://github.com/dtolnay/thiserror/pull/50