@@ -9,9 +9,9 @@ use crate::session::Session;
99/// Can be ran in `extended` mode for more thorough checks.
1010///
1111/// Set `fail_fast` to `false` to run the checks to the end regardless of failure.
12- pub fn run ( session : & Session , extended : bool , fail_fast : bool ) -> anyhow:: Result < ( ) > {
12+ pub fn run ( session : & mut Session , extended : bool , fail_fast : bool ) -> anyhow:: Result < ( ) > {
1313 let mut errs: Vec < anyhow:: Error > = Vec :: new ( ) ;
14- let mut step = |f : & dyn Fn ( ) -> anyhow:: Result < ( ) > | -> anyhow:: Result < ( ) > {
14+ let mut step = |f : & mut dyn FnMut ( ) -> anyhow:: Result < ( ) > | -> anyhow:: Result < ( ) > {
1515 if let Err ( e) = f ( ) {
1616 if fail_fast {
1717 return Err ( e) ;
@@ -22,16 +22,16 @@ pub fn run(session: &Session, extended: bool, fail_fast: bool) -> anyhow::Result
2222 } ;
2323
2424 //step(&|| copyright::run(session))?;
25- step ( & || format:: run ( session, true ) ) ?;
25+ step ( & mut || format:: run ( session, true , true ) ) ?;
2626
2727 if extended {
2828 // We need to avoid --all-targets because it will unify dev and regular dep features.
29- step ( & || clippy:: run ( session, CargoTargets :: Main , true ) ) ?;
30- step ( & || clippy:: run ( session, CargoTargets :: Auxiliary , true ) ) ?;
29+ step ( & mut || clippy:: run ( session, true , CargoTargets :: Main ) ) ?;
30+ step ( & mut || clippy:: run ( session, true , CargoTargets :: Auxiliary ) ) ?;
3131 } else {
3232 // Slightly faster due to shared build cache,
3333 // but will miss unified feature bugs.
34- step ( & || clippy:: run ( session, CargoTargets :: All , true ) ) ?;
34+ step ( & mut || clippy:: run ( session, true , CargoTargets :: All ) ) ?;
3535 }
3636
3737 if errs. is_empty ( ) {
0 commit comments