book icon indicating copy to clipboard operation
book copied to clipboard

Chapter 2 — Out of Order `Generating Random Number` Code Sample Imports

Open jthodge opened this issue 3 years ago • 0 comments

  • [x] I have checked the latest main branch to see if this has already been fixed
  • [x] I have searched existing issues and pull requests for duplicates

URL to the section(s) of the book with this problem: https://doc.rust-lang.org/book/ch02-00-guessing-game-tutorial.html#:~:text=use%20std%3A%3Aio%3B%0Ause%20rand%3A%3ARng%3B

Description of the problem: Currently, imported crates are out of order in the code samples of the Generating a Random Number section of Chapter 02:

use std::io;
use rand::Rng;

Suggested fix: Update the relevant imports to display the following:

use rand::Rng;
use std::io;

jthodge avatar Apr 17 '22 03:04 jthodge