-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Update structs3.rs #608
Update structs3.rs #608
Conversation
as a totally newbie to Rust, I don't know panic statement from https://doc.rust-lang.org/book/ and rustlings in the beginning. After a hard searching of [should_panic], then I figure out panic statement. So it's helpful to tell the learner that write a panic statement here.
As a newcomer to rust I also got a bit confused on that one. Looking at the tests and seeing As such I like the idea behind this change, however I personally think this is giving too much as I think we want the user to think about that should happen if the new function can't create a new Package object. I think a better idea would be to hint at it without directly telling where to put the panic. For example, could we add a sentence or two at the top of the file to tell the the user to pay attention to the two functions which should return something (the |
@jfchevrette |
@all-contributors please add @sundevilyang for content |
@diannasoreil I've put up a pull request to add @sundevilyang! 🎉 |
* upstream/main: docs: update .all-contributorsrc [skip ci] docs: update README.md [skip ci] doc: Add hints on how to get gcc installed (rust-lang#741) docs: update .all-contributorsrc [skip ci] docs: update README.md [skip ci] fix(structs3): Add a hint for panic (rust-lang#608) fix(errors1): Add a comment to make the purpose more clear (rust-lang#486) fix(clippy1): Set clippy::float_cmp lint to deny (rust-lang#907) fix(intro1): Add compiler error explanation. feat(intro): Add intro section. docs(option): improve further information
as a totally newbie to Rust, I don't know panic statement from https://doc.rust-lang.org/book/ and rustlings in the beginning. After a hard searching of [should_panic], then I figure out panic statement. So it's helpful to tell the learner that write a panic statement here.
as a totally newbie to Rust, I don't know panic statement from https://doc.rust-lang.org/book/ and rustlings in the beginning. After a hard searching of [should_panic], then I figure out panic statement. So it's helpful to tell the learner that write a panic statement here.
as a totally newbie to Rust, I don't know panic statement from https://doc.rust-lang.org/book/ and rustlings in the beginning. After a hard searching of [should_panic], then I figure out panic statement. So it's helpful to tell the learner that write a panic statement here.
as a totally newbie to Rust, I don't know panic statement from https://doc.rust-lang.org/book/ and rustlings in the beginning. After a hard searching of [should_panic], then I figure out panic statement.
So it's helpful to tell the learner that write a panic statement here.