Clean up `extern crate` declarations
Currently there are extern crate foo;
declaration across almost every single file. Declaring 1 time in either lib.rs
or main.rs
though is enough and then the crate is available in the global namespace to be used with the use
keyword.
Example:
➜ fractal git:(master) rg -t rust -N --no-filename "extern crate gtk;" | wc -l
50
Process to clean up the code:
- Open
main.rs/lib.rs
- Open a file.
- Cut the
extern crate
statements to the respectivemain.rs/lib.rs
file depending on which crate the file belongs to. - Replace
use self::foo
statements withuse foo
- Repeat