I personally find it easier to mentally parse imports when they are separated
into blocks of
std imports, external crate imports, and internal crate
#[macro_use] extern crate is a Rust 2015-ism, and can be
useing the macro (derive or procedural).
This may be too much of a “personal preference” change, but I really think everything looks better like this. If you’re fine with this, I’ll probably go through the other crates in the workspace and do the same.
Btw, maybe now’s the time to remove
src/commands/checkout.rs? It’s totally unused, and we have
reset --channel. (I didn’t touch it in this change for that reason.)
Done, thanks! I guess the next step in that direction is to reorganise the public API in
libpijul::pristine, but I’ll probably take care of that.
Unrelated, but what were those
org id comments you removed in #UBCBQ5FGH2KASHEUPDLIKGLVVX3GSRQ4F4P2JEJZL2NX2DUSYARAC?
They come from a time where libpijul was written in literate programming, with math all around the functions. But that proved impractical for debugging and testing, as Rust has no support for mapping lines in generated code to lines in the source. Also, my scripts were depending on an obscure C library, which also made it nontrivial to compile.