mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-25 07:32:40 +02:00
When reading the code without an IDE, I find it useful to use explicit module names, especially when items come from the standard library. So `io::Error` instead of just `Error`, especially when people have just been told about `std::error::Error` as well. I also omitted most single-use items: I find it has less cognitive overhead to say “we import `fmt`” and then later use `fmt::Display` and `fmt::Formatter` in the code. It’s clear from the name that these two things have something to do with formatting. Finally, I made a few usages more consistent so that we refer to each item in the same way within a single codeblock.