shepmaster / snafu

Easily assign underlying errors into domain-specific errors while adding context
https://docs.rs/snafu/
Apache License 2.0
1.4k stars 60 forks source link

Clarify unsupported enum variant error message #303

Closed Cyborus04 closed 2 years ago

Cyborus04 commented 2 years ago

Change "Only struct-like and unit enum variants are supported" to "Snafu only supports struct-like and unit enum variants"

289

netlify[bot] commented 2 years ago

✔️ Deploy Preview for shepmaster-snafu ready!

🔨 Explore the source changes: 908ca333e898863b712bd1d4bf9e36802e3c1463

🔍 Inspect the deploy log: https://app.netlify.com/sites/shepmaster-snafu/deploys/61649c3a86a7140008aa21ac

😎 Browse the preview: https://deploy-preview-303--shepmaster-snafu.netlify.app

shepmaster commented 2 years ago

Thanks! I changed the error message a bit to be in line with some others:

Can only derive `Snafu` for an enum or a newtype
Can only derive `Snafu` for enums with struct-like and unit enum variants
Can only derive `Snafu` for tuple structs with exactly one field