Rustfmt: kill duplicates, without merge_imports?

What I like about merge_imports is that I can put all the use ... together in a blob, and it'll delete the duplicates for me.

What I don't like is that it creates a tree, i.e. it produces

pub use self:: {
  foo:: { ... },
  bar::{ ... },

whereas I would prefer a

pub use self::foo::{...};
pub use self::bar::{...};

Is there a way in rustfmt to (1) kill duplicates and (2) leave it in a 'linear' rather than a 'tree' form?

i think that's this issue (so it seems not, at the moment)

1 Like