Skip to content

Commit

Permalink
Use prettyplease rather than rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fasterthanlime committed Dec 6, 2024
1 parent 1c1ecaf commit d8f3744
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 199 deletions.
194 changes: 0 additions & 194 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dylo-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ walkdir = "2.5.0"
syn = { version = "2.0.90", features = ["full"] }
quote = "1.0.37"
proc-macro2 = "1.0.92"
rustfmt-wrapper = "0.2.1"
toml_edit = "0.22.22"
camino = "1.1.9"
pico-args = "0.5.0"
Expand Down
6 changes: 2 additions & 4 deletions dylo-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ fn process_mod(mod_info: ModInfo, force: bool) -> std::io::Result<()> {
attrs: autogen_attrs.clone(),
items: spec_items,
};
let spec_expanded = spec_ast.into_token_stream().to_string();
let spec_formatted = rustfmt_wrapper::rustfmt(spec_expanded).unwrap();
let spec_formatted = prettyplease::unparse(&spec_ast);

let mut missing_spec = true;
let mut missing_support = true;
Expand Down Expand Up @@ -351,8 +350,7 @@ fn process_mod(mod_info: ModInfo, force: bool) -> std::io::Result<()> {
attrs: autogen_attrs.clone(),
items: con_items,
};
let con_expanded = con_ast.into_token_stream().to_string();
let con_formatted = rustfmt_wrapper::rustfmt(con_expanded).unwrap();
let con_formatted = prettyplease::unparse(&con_ast);

tracing::info!(
"📝 Parsed {} in {:.2}s, size: {} bytes",
Expand Down

0 comments on commit d8f3744

Please sign in to comment.