Updates all references from first to second edition of Rust book#368
Updates all references from first to second edition of Rust book#368petertseng merged 2 commits intoexercism:masterfrom nfiles:issue-356-book-second-edition
Conversation
| If you want to know more about Exercism, take a look at the [contribution guide](https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/README.md). | ||
|
|
||
| [help-page]: http://exercism.io/languages/rust | ||
| [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html |
There was a problem hiding this comment.
this is not on you, but I think this was unused. If it were used, I think I would have seen a link that looks like[Crates and modules][crates-and-modules]. We might want to look into that, and maybe a future PR can simply remove the [modules]: and [cargo]: if they are similarly not used. But I would keep what's been done in this PR, since it is just doing what it says it's doing (replace 1st ed with 2nd ed)
There was a problem hiding this comment.
Oh, I forgot how named links in markdown work. That makes sense.
|
I would like to say that this PR does close the linked issue since we have taken all the actions that we can at the current time. I wish there were a way to keep some record of things that we might want to check/take action on in the future. Perhaps an issue is still the right thing to do, just with a certain label. |
| [help-page]: http://exercism.io/languages/rust | ||
| [crates-and-modules]: http://doc.rust-lang.org/stable/book/crates-and-modules.html | ||
| [modules]: https://doc.rust-lang.org/book/second-edition/ch07-00-modules.html | ||
| [crates]: https://doc.rust-lang.org/book/second-edition/ch14-00-more-about-cargo.html |
There was a problem hiding this comment.
differs from config/exercise-readme-insert.md. In particular, the name is crates here but cargo in config/exercise-readme-insert.md. I'm going to regenerate all READMEs to make them the same.
|
So, I hope you don't mind: To make this easier to review, I need to split this up into two commits. One is just editing exercise-readme-insert.md and then regenerating all READMEs using it. That's all automatic and the only file that needs to be reviewed in that particular commit is exercise-readme-insert.md. Then the other commit is all the other files, and all files in that commit should get reviewed. If this is not done I was having too hard of a time knowing which files I actually need to review. |
|
Same as in #365 (comment) . Commit message is being changed from "Updates" to "Update". |
petertseng
left a comment
There was a problem hiding this comment.
Nice job. Don't worry about the comments that start with "not on you". Just two relevant things to deal with, I think.
| As a systems-level language, Rust is frequently used for building any tool where speed, performance and stability are paramount. The [Awesome Rust](https://github.com/kud1ing/awesome-rust) list collects examples of Rust projects, which include CLI tools, ORMs, operating systems and games. Regardless of what you build in Rust, it will be fast and memory safe! | ||
|
|
||
| The home page for Rust is [rust-lang.org](https://www.rust-lang.org/). Rust has excellent documentation at [rust-lang.org/documentation.html](https://www.rust-lang.org/documentation.html). Newcomers should start with "The Book" located at [doc.rust-lang.org/book/](https://doc.rust-lang.org/book/). | ||
| The home page for Rust is [rust-lang.org](https://www.rust-lang.org/). Rust has excellent documentation at [rust-lang.org/documentation.html](https://www.rust-lang.org/documentation.html). Newcomers should start with "The Book" located at [doc.rust-lang.org/book/](https://doc.rust-lang.org/book/second-edition/). |
There was a problem hiding this comment.
about doc.rust-lang.org/book/:
Previously, the link target was indicated by the link text, so if I were to copy the link text and paste it, I would reach the intended target. This is no longer true.
Is it important to keep true?
I don't care so if nobody else cares we will keep it as it currently is in this PR.
There was a problem hiding this comment.
I did not consider that. I think it would make more sense for the two links to match, but it's not a big deal.
| Reading about these Rust topics may help you implement a solution. | ||
|
|
||
| - Lifetimes and Structs: https://doc.rust-lang.org/book/lifetimes.html#impl-blocks | ||
| - Lifetimes and Structs: https://doc.rust-lang.org/book/second-edition/ch10-03-lifetime-syntax.html#lifetime-annotations-in-struct-definitions |
There was a problem hiding this comment.
So, it looks to me like the link to https://doc.rust-lang.org/book/lifetimes.html#impl-blocks (which would now be reachable at https://doc.rust-lang.org/book/first-edition/lifetimes.html#impl-blocks) is meant to help with Brackets::from("[]"). In light of that, might I suggest that https://doc.rust-lang.org/book/second-edition/ch10-03-lifetime-syntax.html#lifetime-annotations-in-method-definitions looks more relevant?
| In this exercise you'll create and implement a custom [trait](https://doc.rust-lang.org/book/traits.html) that performs the validation. | ||
| In this exercise you'll create and implement a custom [trait](https://doc.rust-lang.org/book/second-edition/ch10-02-traits.html) that performs the validation. | ||
|
|
||
| Note: It is [not idiomatic Rust to implement traits on on primitives](https://doc.rust-lang.org/book/traits.html#rules-for-implementing-traits). In this exercise we're showing something that you _can_ do, not something you _should_ do. If you find yourself implementing traits on primitives, perhaps you have a case of [Primitive Obsession](http://wiki.c2.com/?PrimitiveObsession). |
There was a problem hiding this comment.
not on you, so no need to fix in this PR (can in separate commit in this PR, or new PR): "on on"
| In this exercise you'll create and implement a custom [trait](https://doc.rust-lang.org/book/second-edition/ch10-02-traits.html) that performs the validation. | ||
|
|
||
| Note: It is [not idiomatic Rust to implement traits on on primitives](https://doc.rust-lang.org/book/traits.html#rules-for-implementing-traits). In this exercise we're showing something that you _can_ do, not something you _should_ do. If you find yourself implementing traits on primitives, perhaps you have a case of [Primitive Obsession](http://wiki.c2.com/?PrimitiveObsession). | ||
| Note: It is [not idiomatic Rust to implement traits on on primitives](https://doc.rust-lang.org/book/second-edition/ch10-02-traits.html#implementing-a-trait-on-a-type). In this exercise we're showing something that you _can_ do, not something you _should_ do. If you find yourself implementing traits on primitives, perhaps you have a case of [Primitive Obsession](http://wiki.c2.com/?PrimitiveObsession). |
There was a problem hiding this comment.
not on you so no need to change this PR for this: I don't think either the first edition or the second edition link argues that you should not implement traits on primitives.
|
Splitting the huge commit into two separate ones is a good call. I didn't notice that the |
In case anyone is reading this message and wants to generate the READMEs as well, until #354 receives approval so that it can be merged, the Rust track's READMEs are currently generated using a state that actually does not correspond to any exercism/problem-specifications commit; instead, a state that correctly reproduces the current Rust READMEs on master is https://github.com/petertseng/exercism-problem-specifications/tree/rust-readmes. |
|
I just merged a new exercise, so, this PR should get rebased on master so that the README of the new exercise gets the generated change as well. I can do that in a few hours. I sure don't want to add more work on your plate through no fault of yours. |
petertseng
left a comment
There was a problem hiding this comment.
OK, that's all done. I'm out of the allotted time so I can't double check it, necessary before merging. Later.
| Reading about these Rust topics may help you implement a solution. | ||
|
|
||
| - Lifetimes and Structs: https://doc.rust-lang.org/book/lifetimes.html#impl-blocks | ||
| - Lifetimes and Structs: https://doc.rust-lang.org/book/second-edition/ch10-03-lifetime-syntax.html#lifetime-annotations-in-method-definitions |
There was a problem hiding this comment.
whoa there, forgot to regenerate, this should be in both hints and readme
|
Thanks for taking the time to update all these; fantastic work |
|
No problem! Thanks for reviewing everything and directing me through this. It was a ton of work and is very appreciated. :) |
References #356 (not sure if it closes it or not)
The only remaining references to the first edition are in these problems:
For reference, this is the search string I used to find the references:
doc.rust-lang.orgAnd this is the script I used to update the most common first-edition references: