Skip to content

Commit

Permalink
Revert "Work around rustfmt 'rewriting static' bug"
Browse files Browse the repository at this point in the history
This reverts commit 39a3f75.
  • Loading branch information
dtolnay committed Aug 24, 2024
1 parent 8584223 commit cff71f3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions examples/update/update-examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn main() -> Result<()> {

// Write output.rustfmt.rs
let output_path = manifest_dir.join("..").join("output.rustfmt.rs");
let output_file = File::create(&output_path)?;
let output_file = File::create(output_path)?;
Command::new("rustfmt")
.arg("--edition=2021")
.arg("--config=reorder_imports=false")
Expand All @@ -63,12 +63,5 @@ fn main() -> Result<()> {
.spawn()?
.wait()?;

// Work around https://github.com/rust-lang/rustfmt/issues/6210
let rustfmt_content = fs::read_to_string(&output_path)?;
fs::write(
&output_path,
rustfmt_content.replace("rewriting static\n", ""),
)?;

Ok(())
}

0 comments on commit cff71f3

Please sign in to comment.