mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-17 01:35:01 +01:00
Add a split-use pass.
It transforms "use std::io::{Read, Write}" into
"use std::io::Read; use std::io::Write"
Which later allows to remove just precisely the statements
we do not need, and leave rest be.
The test from the last commit does not pass, but that
is seemingly to do with the test harness setup, since it
works fine locally.
This commit is contained in:
parent
963a1faf69
commit
1f6cec7d7b
3 changed files with 142 additions and 1 deletions
|
|
@ -142,6 +142,7 @@ pub fn minimize(options: Options, stop: Arc<AtomicBool>) -> Result<()> {
|
|||
|
||||
minimizer.run_passes([
|
||||
passes::EverybodyLoops::default().boxed(),
|
||||
passes::SplitUse::default().boxed(),
|
||||
passes::FieldDeleter::default().boxed(),
|
||||
passes::Privatize::default().boxed(),
|
||||
])?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue