Skip to content

Commit

Permalink
Merge pull request #78 from dtolnay/rustfmtbug
Browse files Browse the repository at this point in the history
Revert "Work around rustfmt 'rewriting static' bug"
  • Loading branch information
dtolnay authored Aug 24, 2024
2 parents 8584223 + cff71f3 commit 53aac30
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 53aac30

Please sign in to comment.