-
Notifications
You must be signed in to change notification settings - Fork 9
Description
This one is purely to do with style, so it's only if you think it's a good idea.
Essentially, I've found it a bit unusual to have Std*
types everywhere in my project that doesn't use tokio
— I reckon (though this is just my intuition), that most people using this library would be using either std
or tokio
and that mixing is rare? In that case, I think lines like this:
use process_wrap::std::{StdChildWrapper, StdCommandWrap, StdCommandWrapper};
Might look better like this:
use process_wrap::std::{ChildWrapper, CommandWrap, CommandWrapper};
If you did ever have to mix those two types in the same module, then I think it would be perfectly reasonable to just:
use process_wrap::{std, tokio};
// Then refer to the types as:
std::ChildWrapper, std::CommandWrap, std::CommandWrapper
// And
tokio::ChildWrapper, tokio::CommandWrap, tokio::CommandWrapper
There used to be a clippy lint for this (https://rust-lang.github.io/rust-clippy/master/#module_name_repetitions), but it's pretty pedantic, so, again, I think this is up to your preference!
It saves characters most of the time, and only adds two (::
) in the worst-case.