Skip to content

Commit fea3080

Browse files
committed
Format
1 parent b433e63 commit fea3080

19 files changed

+0
-22
lines changed

src/bin/cargo-fmt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ fn get_targets(workspace_hitlist: WorkspaceHitlist) -> Result<Vec<Target>, std::
271271
std::io::ErrorKind::NotFound,
272272
str::from_utf8(&output.stderr).unwrap(),
273273
))
274-
275274
}
276275

277276
fn target_from_json(jtarget: &Value) -> Target {

src/bin/rustfmt.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ fn match_cli_path_or_file(
102102
config_path: Option<PathBuf>,
103103
input_file: &Path,
104104
) -> FmtResult<(Config, Option<PathBuf>)> {
105-
106105
if let Some(config_file) = config_path {
107106
let toml = Config::from_toml_path(config_file.as_ref())?;
108107
return Ok((toml, Some(config_file)));

src/expr.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,6 @@ fn choose_rhs(
29852985
}
29862986

29872987
fn prefer_next_line(orig_rhs: &str, next_line_rhs: &str) -> bool {
2988-
29892988
fn count_line_breaks(src: &str) -> usize {
29902989
src.chars().filter(|&x| x == '\n').count()
29912990
}

src/filemap.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ pub fn write_file<T>(
9090
where
9191
T: Write,
9292
{
93-
9493
fn source_and_formatted_text(
9594
text: &StringBuffer,
9695
filename: &str,

src/types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ where
404404
} else {
405405
Some(format!("{}{}", args, output))
406406
}
407-
408407
}
409408

410409
fn type_bound_colon(context: &RewriteContext) -> &'static str {
@@ -601,7 +600,6 @@ impl Rewrite for ast::TyParam {
601600
result.push_str(&join_bounds(context, shape, &strs));
602601
}
603602
if let Some(ref def) = self.default {
604-
605603
let eq_str = match context.config.type_punctuation_density() {
606604
TypeDensity::Compressed => "=",
607605
TypeDensity::Wide => " = ",

tests/source/fn-simple.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@ pub fn waltz(cwd: &Path) -> CliAssert {
5151
formatted_comment = rewrite_comment(comment, block_style, width, offset, formatting_fig);
5252
}
5353
}
54-
5554
}

tests/source/indent_match_arms.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ fn main() {
2323
},
2424
_ => "something else",
2525
}
26-
2726
}

tests/source/issue-510.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ fn solve_inline_size_constraints(&self,
33
block: &mut BlockFlow,
44
input: &ISizeConstraintInput)
55
-> ISizeConstraintSolution {
6-
76
let (inline_start,inline_size,margin_inline_start,margin_inline_end) =
87
match (inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx) {
98
(MaybeAuto::Auto, MaybeAuto::Auto, MaybeAuto::Auto) => {

tests/source/spaces-within-angle-brackets.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ fn foo<T, E>(a: T, b: E) {
3131
}
3232

3333
fn foo<T: Send, E: Send>(a: T, b: E) {
34-
3534
foo::<u32, str>(10, "bar");
3635

3736
let opt: Option<u32>;

tests/source/spaces-within-parens.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ struct TupleStruct2(u32, u32);
1414
fn fooEmpty() {}
1515

1616
fn foo(e: E, _: u32) -> (u32, u32) {
17-
1817
// Tuples
1918
let t1 = ();
2019
let t2 = (1,);

tests/source/spaces-within-square-brackets.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// rustfmt-spaces_within_square_brackets: true
22

33
fn main() {
4-
54
let arr: [i32; 5] = [1, 2, 3, 4, 5];
65
let arr: [i32; 500] = [0; 500];
76

tests/source/struct_tuple_visual.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// rustfmt-error_on_line_overflow: false
44
// rustfmt-struct_lit_style: Visual
55
fn foo() {
6-
76
Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
87

98
Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(// Comment
@@ -35,5 +34,4 @@ fn foo() {
3534
// /|\ \
3635
// o o o o
3736
G)
38-
3937
}

tests/target/fn-simple.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,4 @@ pub fn waltz(cwd: &Path) -> CliAssert {
9696
rewrite_comment(comment, block_style, width, offset, formatting_fig);
9797
}
9898
}
99-
10099
}

tests/target/indent_match_arms.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ fn main() {
2323
},
2424
_ => "something else",
2525
}
26-
2726
}

tests/target/issue-510.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ impl ISizeAndMarginsComputer for AbsoluteNonReplaced {
44
block: &mut BlockFlow,
55
input: &ISizeConstraintInput,
66
) -> ISizeConstraintSolution {
7-
87
let (inline_start, inline_size, margin_inline_start, margin_inline_end) = match (
98
inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,
109
inline_startssssssxxxxxxsssssxxxxxxxxxssssssxxx,

tests/target/spaces-within-angle-brackets.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ fn foo< T, E >(a: T, b: E) {
3131
}
3232

3333
fn foo< T: Send, E: Send >(a: T, b: E) {
34-
3534
foo::< u32, str >(10, "bar");
3635

3736
let opt: Option< u32 >;

tests/target/spaces-within-parens.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ struct TupleStruct2( u32, u32 );
1414
fn fooEmpty() {}
1515

1616
fn foo( e: E, _: u32 ) -> ( u32, u32 ) {
17-
1817
// Tuples
1918
let t1 = ();
2019
let t2 = ( 1, );

tests/target/spaces-within-square-brackets.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// rustfmt-spaces_within_square_brackets: true
22

33
fn main() {
4-
54
let arr: [ i32; 5 ] = [ 1, 2, 3, 4, 5 ];
65
let arr: [ i32; 500 ] = [ 0; 500 ];
76

tests/target/struct_tuple_visual.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// rustfmt-error_on_line_overflow: false
44
// rustfmt-struct_lit_style: Visual
55
fn foo() {
6-
76
Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
87

98
Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(
@@ -45,5 +44,4 @@ fn foo() {
4544
// o o o o
4645
G,
4746
)
48-
4947
}

0 commit comments

Comments
 (0)