Skip to content

use imports are wrapped unless double-nested imports are present #3286

Open
@cramertj

Description

@cramertj

rustfmt gives this:

use {
    fidl_fuchsia_hardware_ethernet_ext::EthernetQueueFlags, futures::TryStreamExt, std::fs::File,
    structopt::StructOpt,
};

which is, IMO, pretty gross as it mixes imports from many different crates all together onto the same line.

Adding a group after _ext:: and adding Bar to it gives this:

use {
    fidl_fuchsia_hardware_ethernet_ext::{Bar, EthernetQueueFlags},
    futures::TryStreamExt,
    std::fs::File,
    structopt::StructOpt,
};

which is more like what I would expect. What's going on here? Is there a setting that can be enabled to always get the bottom layout, even when no nested groups are present?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions