-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return
Result
in accessors instead of panic (#286)
As previously suggested in #274, I replaced the `.expect` with returning a `Result` in the operation accessors of ODS generated dialects. I also added some variants to the `Error` enum to support this. The `Infallible` variant was added to allow using `TryInto` to convert `Attribute` into itself, such that we avoid needing to handle `Attribute` differently from `StringAttribute`, `IntAttribute`, etc. But if you prefer, I can change the macro code to deal with this case instead, I'm honestly not a big fan of my `Infallible` hack either. --------- Co-authored-by: Yota Toyama <[email protected]>
- Loading branch information
Showing
6 changed files
with
68 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters