-
Notifications
You must be signed in to change notification settings - Fork 678
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
Add examples for object and numeric protocols #2156
Conversation
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.
Lovely to see additional docs and examples added, thank you as always! Sprinkled some comments :)
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.
LGTM; feel free to merge unless you plan to add more to this branch? One tiny typo spotted...
@@ -58,7 +58,7 @@ impl Number { | |||
// format string, followed by any number of parameters which replace the | |||
// `{}`'s in the format string. | |||
// | |||
// `.0` is how in Rust you get the first value of a tuple struct. | |||
// 👇 Tuple field access in Rust uses a dot |
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.
Haha love this!
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 saw this in a https://fasterthanli.me blog the other day and liked it. I figured I'd `steal copy learn from him :)
I don't understand why this test is failing. |
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 adding the test! One final suggestion on a comment, then let's merge?
This'll need a rebase (or merge from master) since #2165 went in. Feel free to do that (maybe squash some of the "try fix CI" commits together) and then merge this at your leisure 👍 |
😳 |
Todo: