Skip to content

Commit f1bf9ec

Browse files
committed
run rustfmt on workspace
1 parent db31f37 commit f1bf9ec

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ fn check_keyword<'a, 'b: 'a>(parser: &'a mut Parser<'b>) -> Option<MacroArg> {
234234
parser.bump();
235235
return Some(MacroArg::Keyword(
236236
ast::Ident::with_dummy_span(keyword),
237-
parser.prev_span
237+
parser.prev_span,
238238
));
239239
}
240240
}

src/syntux/parser.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ impl<'a> ParserBuilder<'a> {
8686
parser.cfg_mods = false;
8787
parser.recurse_into_file_modules = config.recursive();
8888

89-
9089
Ok(Parser { parser, sess })
9190
}
9291

src/syntux/session.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,8 @@ mod tests {
303303
let emitter_writer = TestEmitter { num_emitted_errors };
304304
let source_map =
305305
source_map.unwrap_or_else(|| Rc::new(SourceMap::new(FilePathMapping::empty())));
306-
let ignore_path_set = Rc::new(
307-
IgnorePathSet::from_ignore_list(
308-
&ignore_list.unwrap_or_default(),
309-
)
310-
.unwrap(),
311-
);
306+
let ignore_path_set =
307+
Rc::new(IgnorePathSet::from_ignore_list(&ignore_list.unwrap_or_default()).unwrap());
312308
SilentOnIgnoredFilesEmitter {
313309
has_non_ignorable_parser_errors: false,
314310
source_map,

src/test/mod.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ fn is_file_skip(path: &Path) -> bool {
101101
fn get_test_files(path: &Path, recursive: bool) -> Vec<PathBuf> {
102102
let mut files = vec![];
103103
if path.is_dir() {
104-
for entry in fs::read_dir(path).unwrap_or_else(|_| panic!(
105-
"couldn't read directory {}",
106-
path.display()
107-
)) {
104+
for entry in fs::read_dir(path)
105+
.unwrap_or_else(|_| panic!("couldn't read directory {}", path.display()))
106+
{
108107
let entry = entry.expect("couldn't get `DirEntry`");
109108
let path = entry.path();
110109
if path.is_dir() && recursive {
@@ -118,10 +117,9 @@ fn get_test_files(path: &Path, recursive: bool) -> Vec<PathBuf> {
118117
}
119118

120119
fn verify_config_used(path: &Path, config_name: &str) {
121-
for entry in fs::read_dir(path).unwrap_or_else(|_| panic!(
122-
"couldn't read {} directory",
123-
path.display()
124-
)) {
120+
for entry in
121+
fs::read_dir(path).unwrap_or_else(|_| panic!("couldn't read {} directory", path.display()))
122+
{
125123
let entry = entry.expect("couldn't get directory entry");
126124
let path = entry.path();
127125
if path.extension().map_or(false, |f| f == "rs") {
@@ -891,8 +889,7 @@ fn make_temp_file(file_name: &'static str) -> TempFile {
891889

892890
let mut file = File::create(&path).expect("couldn't create temp file");
893891
let content = b"fn main() {}\n";
894-
file.write_all(content)
895-
.expect("couldn't write temp file");
892+
file.write_all(content).expect("couldn't write temp file");
896893
TempFile { path }
897894
}
898895

0 commit comments

Comments
 (0)