hannobraun / stepper

Universal Stepper Motor Interface
Other
107 stars 17 forks source link

Simplify `motion_control::Error` #109

Closed hannobraun closed 3 years ago

hannobraun commented 3 years ago

Remove all trait bounds from motion_control::Error, simplifying the enum significantly. This comes at the cost of more type parameters, but I believe the reduced complexity is worth it. It is already bearing fruit in this pull request, allowing for the replacement of the custom Debug implementation with a much simpler (and less error-prone) #[derive(Debug)]. It's also going to make some conversions I'd like to implement between error types much more practical.