diff --git a/src/ch02-00-guessing-game-tutorial.md b/src/ch02-00-guessing-game-tutorial.md index 3c590a1994..2590c14414 100644 --- a/src/ch02-00-guessing-game-tutorial.md +++ b/src/ch02-00-guessing-game-tutorial.md @@ -544,6 +544,13 @@ random number in the range. The kind of range expression we’re using here take the form `start..=end` and is inclusive on the lower and upper bounds, so we need to specify `1..=100` to request a number between 1 and 100. +> Note: If you are using `rand` version 0.9 or newer, some APIs have been renamed. +> In that case, the equivalent code looks like this: +> +> ```rust,ignore +> let secret_number = rand::rng().random_range(1..=100); +> ``` + > Note: You won’t just know which traits to use and which methods and functions > to call from a crate, so each crate has documentation with instructions for > using it. Another neat feature of Cargo is that running the `cargo doc