Skip to content

Commit 1388f24

Browse files
committed
rustfmt
1 parent 0d4a19c commit 1388f24

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/driver.rs

+15-12
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#[allow(unused_extern_crates)]
99
extern crate rustc_driver;
1010
#[allow(unused_extern_crates)]
11-
extern crate rustc_plugin;
12-
#[allow(unused_extern_crates)]
1311
extern crate rustc_interface;
12+
#[allow(unused_extern_crates)]
13+
extern crate rustc_plugin;
1414

1515
use rustc_interface::interface;
1616
use std::path::Path;
@@ -69,10 +69,14 @@ impl rustc_driver::Callbacks for ClippyCallbacks {
6969
let sess = compiler.session();
7070
let mut registry = rustc_plugin::registry::Registry::new(
7171
sess,
72-
compiler.parse().expect(
73-
"at this compilation stage \
74-
the crate must be parsed",
75-
).peek().span,
72+
compiler
73+
.parse()
74+
.expect(
75+
"at this compilation stage \
76+
the crate must be parsed",
77+
)
78+
.peek()
79+
.span,
7680
);
7781
registry.args_hidden = Some(Vec::new());
7882

@@ -195,13 +199,12 @@ pub fn main() {
195199

196200
let mut clippy = ClippyCallbacks;
197201
let mut default = rustc_driver::DefaultCallbacks;
198-
let callbacks: &mut (dyn rustc_driver::Callbacks + Send) = if clippy_enabled {
199-
&mut clippy
200-
} else {
201-
&mut default
202-
};
202+
let callbacks: &mut (dyn rustc_driver::Callbacks + Send) =
203+
if clippy_enabled { &mut clippy } else { &mut default };
203204
let args = args;
204205
rustc_driver::run_compiler(&args, callbacks, None, None)
205-
}).and_then(|result| result).is_err() as i32
206+
})
207+
.and_then(|result| result)
208+
.is_err() as i32,
206209
)
207210
}

0 commit comments

Comments
 (0)