You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JelteF
changed the title
Use dedicated error type for errors returned by Add and Not enum implementations
Use dedicated error type for errors returned by Add, Not and FromStr
Nov 20, 2022
Adds `ops::UnitError`, `ops::WrongVariantError` and `ops::BinaryError` to `derive_more` crate and uses them in `Add`-like and `Not`-like derives.
Additionally:
- Renames `derive_more::errors` module as `derive_more::convert` to follow `std`/`core` naming conventions.
- Adds `#[doc(hidden)]` attribute on to `new()` methods of created error types. This way we mimic them as not public, thus won't introduce breaking changes in future once we need to modify their private fields.
Part of #221Resolves#221
## Synopsis
#221 (comment)
## Solution
Adds `FromStrError` type and uses it in `#[derive(FromStr)]` expansion
for enums instead of generating an error type in-place.
liveseed
added a commit
to liveseed/derive_more
that referenced
this issue
Aug 20, 2024
Part of #221
Resolves #221
## Synopsis
JelteF/derive_more#221 (comment)
## Solution
Adds `FromStrError` type and uses it in `#[derive(FromStr)]` expansion
for enums instead of generating an error type in-place.
For consistency with #220 we should have custom error types for Add, Not and FromStr too
The text was updated successfully, but these errors were encountered: