Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Condense use statements #733

Open
Nokel81 opened this issue Jan 28, 2020 · 1 comment
Open

Condense use statements #733

Nokel81 opened this issue Jan 28, 2020 · 1 comment

Comments

@Nokel81
Copy link

Nokel81 commented Jan 28, 2020

It would be very nice if there was an easy way to condense all the use statements as much as possible. Such a feature would do change A) into B).

A)

use std::collections::HashMap;
use std::fs;
use std::fmt;
use std::fmt::{Display, Debug};

B)

use std::{collections::HashMap, fs, fmt::{self, Display, Debug}};
@DouglasLivingstone
Copy link

This will need support from rustfmt, there's discussion about adding a "merge_imports" feature here: rust-lang/rustfmt#3362

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants