-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
feat: Add move_semantics5 exercise. #746
Conversation
@fmoko Now that this PR is approved can you please merge this change. Or are there any additional steps I need to take for this PR to be merged. Thanks. |
@all-contributors please add @sateeshkumarb for code and content |
@fmoko I've put up a pull request to add @sateeshkumarb! 🎉 |
My first instinct was to solve this with match &y {
Some(p) => println!("Co-ordinates are {},{} ", p.x, p.y), I assume this is the intended solution: match y {
Some(ref p) => println!("Co-ordinates are {},{} ", p.x, p.y), I'm still hazy on the difference between Wondering if this exercise could be made more restrictive to force the |
@milesfrain That is a good point and after your comment I did searched around and experimented but I couldn't come up with a way to make this exercise to be restrictive to force ref solution. Thanks for pointing this out. |
* upstream/main: fix: move_semantics5 hints chore: minor typos in move_semantics5 hints docs: update .all-contributorsrc [skip ci] docs: update README.md [skip ci] feat: Add move_semantics5 exercise. (rust-lang#746) fix(try_from_into, from_str): hints for dyn Error
* feat: Add move_semantics5 exercise. * feat: Add option3 exercise * Address review comments. Fix typos, sentence formatting. * Remove unwanted newline. * Address review comments: make comment inline, fix format in print.
* feat: Add move_semantics5 exercise. * feat: Add option3 exercise * Address review comments. Fix typos, sentence formatting. * Remove unwanted newline. * Address review comments: make comment inline, fix format in print.
* feat: Add move_semantics5 exercise. * feat: Add option3 exercise * Address review comments. Fix typos, sentence formatting. * Remove unwanted newline. * Address review comments: make comment inline, fix format in print.
* feat: Add move_semantics5 exercise. * feat: Add option3 exercise * Address review comments. Fix typos, sentence formatting. * Remove unwanted newline. * Address review comments: make comment inline, fix format in print.
* feat: Add move_semantics5 exercise. * feat: Add option3 exercise * Address review comments. Fix typos, sentence formatting. * Remove unwanted newline. * Address review comments: make comment inline, fix format in print.
move_semantics
which helps in improving the understanding of mutable references.option
which helps in understanding of usage of keyword ref