1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-25 07:32:40 +02:00
Martin Geisler 1d7c9163f5
Simplify imports by importing fewer items directly (#2404)
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.
2024-10-29 11:19:58 +01:00
..
2024-10-15 08:12:25 +02:00
2024-10-15 16:14:25 +02:00
2024-10-16 11:28:25 +02:00
2024-02-12 09:39:40 -05:00