some minor issues when walking through https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html
cargo new guessing_game
is still creating
edition = "2018"
not yet 2019
much newer library version than rand = "0.3.14"
cargo search rand
rand = "0.6.5"
u8 would be enough in this case, no?
let guess: u8 = guess.trim().parse().expect("Please type a number!");
great tutorial, thank you very much!
not yet 2019
It shouldn't create 2019; did the book say that it should?
much newer library version than rand = "0.3.14"
Yes, we haven't updated yet. The nice thing is that the older one still works, but we should update at some point. Let's make sure to keep this open to track this.
u8 would be enough in this case, no?
Yes, we picked u32 because it's the sort of default integer type, I think, but that would work. @carols10cents do you remember?
Thanks for the thanks, as well as letting us know about issues!
not yet 2019
It shouldn't create 2019; did the book say that it should?
Yep, to be clear: there is no edition 2019. We don't yet know exactly what the edition after 2018 will be, but we're not planning on a 2019 edition.
Yes, we picked u32 because it's the sort of default integer type, I think, but that would work. @carols10cents do you remember?
u8 would work, but then we'd have to discuss integer sizes earlier than we wanted to. See: https://github.com/rust-lang/book/pull/1661
Yes, we haven't updated yet. The nice thing is that the older one still works, but we should update at some point. Let's make sure to keep this open to track this.
Updated the title to reflect the one issue this bug is for! Thanks!
I wouldn't categorize this as a bug; the book actually goes ahead to to talk about versioning in the same chapter:
But by default, Cargo will only look for versions greater than 0.5.5 and less than 0.6.0. If the rand crate has released two new versions, 0.5.6 and 0.6.0, you would see the following if you ran cargo update:
...
If you wanted to use rand version 0.6.0 or any version in the 0.6.x series, you鈥檇 have to update the Cargo.toml file to look like this instead:
This actually maintains the relevance of the above statements, especially for someone just beginning.
Yes, thinking about this more, and considering the very little time Steve and I have to spend on this, we're not going to worry about keeping the version of rand up to date. Thanks though!