From cff71f363cef5d8d49623491696e0e7239dcd9e3 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 23 Aug 2024 22:56:15 -0700 Subject: [PATCH] Revert "Work around rustfmt 'rewriting static' bug" This reverts commit 39a3f750187f63b395bdff1d38da75a8bfe0f242. --- examples/update/update-examples.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/update/update-examples.rs b/examples/update/update-examples.rs index 0be9527..f6a0d23 100644 --- a/examples/update/update-examples.rs +++ b/examples/update/update-examples.rs @@ -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") @@ -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(()) }