-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modules: Change all *Reader
traits to return Result
instead of Option
#1283
modules: Change all *Reader
traits to return Result
instead of Option
#1283
Conversation
ClientReader
trait to return Result
s
Hi @yito88, LGTM! 👌 I think we all agree that it would be useful to have methods of all |
@hu55a1n1 Thank you for reviewing! |
That's great to hear, thanks @yito88! |
ClientReader
trait to return Result
s*Reader
traits to return Result
instead of Option
Co-authored-by: Romain Ruetschi <romain.ruetschi@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @yito88! 🙏 The error handling code looks much cleaner now with more use of the question mark operator (?
). 👌
I have added some comments mostly related to removing redundant error variants. I think there is an opportunity for more cleanup if we add an Ics03Connection
variant to Ics04Error
, because that will allow us to reuse errors from Ics03Error
(and by extension Ics02Error
using the Ics03Error::Ics02Client
variant) and avoid redundant errors such as Ics04Error::ClientNotFound
, MissingClientState
, etc. I think there is already a lot of work done in this PR, so I would suggest we open a different issue/PR for that.
modules/src/application/ics20_fungible_token_transfer/relay_application_logic/send_transfer.rs
Show resolved
Hide resolved
@hu55a1n1 Thank you for your comments! That makes sense 👍 -- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ption` (informalsystems#1283) * ClientReader returns Result * fix: remove unneeded into() * add other errors * remove new errors * ConnectionReader returns Result * ChannelReader returns Result * PortReader returns Result * modify the change log * Update .changelog/unreleased/improvements/ibc/1268-reader-result.md Co-authored-by: Romain Ruetschi <romain.ruetschi@gmail.com> Co-authored-by: Romain Ruetschi <romain.ruetschi@gmail.com>
Closes: cosmos/ibc-rs#73
Description
ClientReader
returnsResult
instead ofOption
so that we can handle errorsFor contributor use:
unclog
.docs/
) and code comments.Files changed
in the Github PR explorer.