Both "extern crate" and #[macro_use] are artifacts of earlier editions
of Rust language. Nowadays we can entirely rely on "use" instead.
Changes:
- Replace "extern crate" with "use" imports.
- Replace
#[macro_use]
extern crate ...;
declarations with "use" imports of used macros. For example,
#[macro_use]
extern crate anyhow;
was replaced with
use anyhow::anyhow;
in every file where anyhow! macro were used.
- Favor direct usage of import path instead of aliased one.
For example, in many places "sequoia_opengpg" were aliased as "openpgp",
during imports replacements I tried to avoid usage of "openpgp" or
introduced additional aliases (like "use sequoia_openpgp as openpgp")
and used "sequoia_opengpg".
I think this way it is easier to understand where name came from
instead of search and jumping to lib.rs or main.rs files trying to
find where name were aliased.
Another example of such favoring is usage of "hagrid_database" over
the "database" in imports.
NOTE: the usage is still inconsistent and requires further clean up.