cargo-minimize-oom 0.1.0

A tool for minimizing rustc ICEs, specially OOMs
1
2
3
4
5
6
7
8
9
10
11
use std::collections::BTreeMap;

use genemichaels::FormatConfig;

pub fn format(file: syn::File) -> anyhow::Result<String> {
    Ok(
        genemichaels::format_ast(file, &FormatConfig::default(), BTreeMap::new())
            .map_err(|e| anyhow::format_err!("formatting source file: {:?}", e))?
            .rendered,
    )
}