Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.
The current example in docs looks like this:
use foo::b::{f, g};
use foo::d::e;
use foo::{a, b, c};
use qux::{h, i};
Current formatting of "top-level" modules
For imports of a entire modules, when the path only has a single item (no submodules), the current output when using imports_granularity = "Module" is to format like this:
use {library1, library2 as lib2, library3};
Suggested formatting of "top-level" modules
The docs say "imports from different modules are split into separate statements". My reading of the docs and my intuition would say the formatting should instead look like this:
Documented behavior
The current docs for
imports_granularity = "Module"
say this:The current example in docs looks like this:
Current formatting of "top-level" modules
For imports of a entire modules, when the path only has a single item (no submodules), the current output when using
imports_granularity = "Module"
is to format like this:Suggested formatting of "top-level" modules
The docs say "imports from different modules are split into separate statements". My reading of the docs and my intuition would say the formatting should instead look like this: