Skip to content

Commit 4c11002

Browse files
committed
Better fmt for file body
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
1 parent 4225c46 commit 4c11002

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

tests/testsuite/fix.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,41 +1691,41 @@ fn fix_with_run_cargo_in_proc_macros() {
16911691
.file(
16921692
"Cargo.toml",
16931693
r#"
1694-
[package]
1695-
name = "foo"
1696-
version = "0.1.0"
1697-
edition = "2018"
1694+
[package]
1695+
name = "foo"
1696+
version = "0.1.0"
1697+
edition = "2018"
16981698
1699-
[lib]
1700-
proc-macro = true
1701-
"#,
1699+
[lib]
1700+
proc-macro = true
1701+
"#,
17021702
)
17031703
.file(
17041704
"src/lib.rs",
17051705
r#"
1706-
use proc_macro::*;
1706+
use proc_macro::*;
17071707
1708-
#[proc_macro]
1709-
pub fn foo(_input: TokenStream) -> TokenStream {
1710-
let output = std::process::Command::new("cargo")
1711-
.args(&["metadata", "--format-version=1"])
1712-
.output()
1713-
.unwrap();
1714-
eprintln!("{}", std::str::from_utf8(&output.stderr).unwrap());
1715-
println!("{}", std::str::from_utf8(&output.stdout).unwrap());
1716-
"".parse().unwrap()
1717-
}
1718-
"#,
1708+
#[proc_macro]
1709+
pub fn foo(_input: TokenStream) -> TokenStream {
1710+
let output = std::process::Command::new("cargo")
1711+
.args(&["metadata", "--format-version=1"])
1712+
.output()
1713+
.unwrap();
1714+
eprintln!("{}", std::str::from_utf8(&output.stderr).unwrap());
1715+
println!("{}", std::str::from_utf8(&output.stdout).unwrap());
1716+
"".parse().unwrap()
1717+
}
1718+
"#,
17191719
)
17201720
.file(
17211721
"src/bin/main.rs",
17221722
r#"
1723-
use foo::foo;
1723+
use foo::foo;
17241724
1725-
fn main() {
1726-
foo!("bar")
1727-
}
1728-
"#,
1725+
fn main() {
1726+
foo!("bar")
1727+
}
1728+
"#,
17291729
)
17301730
.build();
17311731
p.cargo("fix --allow-no-vcs")

0 commit comments

Comments
 (0)