nannou-org / nannou

A Creative Coding Framework for Rust.
https://nannou.cc/
6.05k stars 306 forks source link

Implement public Error types using thiserror #892

Open frankplow opened 2 years ago

frankplow commented 2 years ago

This PR implements the Error trait for DrawError using the derive macro provided by thiserror. This requires adding the thiserror dependency to nannou. This is in keeping with how Errors are implemented elsewhere in the project however - thiserror is already used in nannou_audio, nannou_laser and nannou_isf.

frankplow commented 2 years ago

742b86b extends the thiserror approach to the other public Error types from nannou. This reduces boilerplate and increases consistency across the codebase.