-
Notifications
You must be signed in to change notification settings - Fork 544
wordy: Added template to the stub file #595
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
Conversation
yes, I think so. At the time I wrote #444 (comment) I was thinking strings for the E in |
Done |
exercises/wordy/src/lib.rs
Outdated
|
||
pub fn answer(&self) -> Option<i32> { | ||
unimplemented!( | ||
"Return the result of the transmitted command, or an error, if the command is invalid." |
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.
I think this should talk about None
instead of error
, now, right?
I'll prefer that change be amended into the Result -> Option commit so all the necessary changes for Result->Option are in one commit. It's small enough that amending won't cause a review burden.
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.
Agreed.
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.
Thanks for implementing this, @ZapAnton! Assuming the wording change is made and there are no other maintainer objections, I'll merge this not later than Wednesday.
exercises/wordy/src/lib.rs
Outdated
|
||
pub fn answer(&self) -> Option<i32> { | ||
unimplemented!( | ||
"Return the result of the transmitted command, or an error, if the command is invalid." |
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.
Agreed.
2b2fc48
to
1b5f0d7
Compare
Contributes to the #551
The returned type of the
WordProblem::answer
function isResult<i32, String>
, but perhapsOption<i32>
is more suited here?