We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8f7bb3a + 39a3f75 commit 93f2078Copy full SHA for 93f2078
examples/update/update-examples.rs
@@ -47,7 +47,7 @@ fn main() -> Result<()> {
47
48
// Write output.rustfmt.rs
49
let output_path = manifest_dir.join("..").join("output.rustfmt.rs");
50
- let output_file = File::create(output_path)?;
+ let output_file = File::create(&output_path)?;
51
Command::new("rustfmt")
52
.arg("--edition=2021")
53
.arg("--config=reorder_imports=false")
@@ -63,5 +63,12 @@ fn main() -> Result<()> {
63
.spawn()?
64
.wait()?;
65
66
+ // Work around https://github.com/rust-lang/rustfmt/issues/6210
67
+ let rustfmt_content = fs::read_to_string(&output_path)?;
68
+ fs::write(
69
+ &output_path,
70
+ rustfmt_content.replace("rewriting static\n", ""),
71
+ )?;
72
+
73
Ok(())
74
}
0 commit comments