Skip to content

Commit b27089d

Browse files
committed
Fix format
1 parent e492ca8 commit b27089d

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/libsyntax/json/tests.rs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
use super::*;
22

3-
use crate::tests::{Shared};
43
use crate::json::JsonEmitter;
5-
use crate::source_map::{SourceMap, FilePathMapping};
4+
use crate::source_map::{FilePathMapping, SourceMap};
5+
use crate::tests::Shared;
66
use crate::with_default_globals;
77

8-
use errors::emitter::{HumanReadableErrorType, ColorConfig};
8+
use errors::emitter::{ColorConfig, HumanReadableErrorType};
99
use errors::Handler;
1010
use rustc_serialize::json::decode;
1111
use syntax_pos::{BytePos, Span};
@@ -29,7 +29,6 @@ struct SpanTestData {
2929

3030
/// Test the span yields correct positions in JSON.
3131
fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) {
32-
3332
let expected_output = TestData { spans: vec![expected_output] };
3433

3534
with_default_globals(|| {
@@ -43,7 +42,7 @@ fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) {
4342
sm,
4443
true,
4544
HumanReadableErrorType::Short(ColorConfig::Never),
46-
false
45+
false,
4746
);
4847

4948
let span = Span::with_root_ctxt(BytePos(span.0), BytePos(span.1));
@@ -52,7 +51,7 @@ fn test_positions(code: &str, span: (u32, u32), expected_output: SpanTestData) {
5251

5352
let bytes = output.lock().unwrap();
5453
let actual_output = str::from_utf8(&bytes).unwrap();
55-
let actual_output : TestData = decode(actual_output).unwrap();
54+
let actual_output: TestData = decode(actual_output).unwrap();
5655

5756
println!("expected output:\n------\n{:#?}------", expected_output);
5857
println!("actual output:\n------\n{:#?}------", actual_output);
@@ -73,7 +72,7 @@ fn empty() {
7372
column_start: 1,
7473
line_end: 1,
7574
column_end: 2,
76-
}
75+
},
7776
)
7877
}
7978

@@ -89,7 +88,7 @@ fn bom() {
8988
column_start: 1,
9089
line_end: 1,
9190
column_end: 2,
92-
}
91+
},
9392
)
9493
}
9594

@@ -105,7 +104,7 @@ fn lf_newlines() {
105104
column_start: 5,
106105
line_end: 3,
107106
column_end: 3,
108-
}
107+
},
109108
)
110109
}
111110

@@ -121,7 +120,7 @@ fn crlf_newlines() {
121120
column_start: 5,
122121
line_end: 3,
123122
column_end: 3,
124-
}
123+
},
125124
)
126125
}
127126

@@ -137,7 +136,7 @@ fn crlf_newlines_with_bom() {
137136
column_start: 5,
138137
line_end: 3,
139138
column_end: 3,
140-
}
139+
},
141140
)
142141
}
143142

@@ -153,7 +152,7 @@ fn span_before_crlf() {
153152
column_start: 3,
154153
line_end: 1,
155154
column_end: 4,
156-
}
155+
},
157156
)
158157
}
159158

@@ -169,7 +168,7 @@ fn span_on_crlf() {
169168
column_start: 4,
170169
line_end: 2,
171170
column_end: 1,
172-
}
171+
},
173172
)
174173
}
175174

@@ -185,6 +184,6 @@ fn span_after_crlf() {
185184
column_start: 1,
186185
line_end: 2,
187186
column_end: 2,
188-
}
187+
},
189188
)
190189
}

0 commit comments

Comments
 (0)