@@ -63,8 +63,7 @@ fn main() -> ExitCode {
6363 let config_file = Path :: new ( & config_file) ;
6464 let config = read_config ( config_file) ;
6565
66- let status: ColoredStatus =
67- process ( & args. base , & args. nixpkgs , & config) . into ( ) ;
66+ let status: ColoredStatus = process ( & args. base , & args. nixpkgs , & config) . into ( ) ;
6867 eprintln ! ( "{status}" ) ;
6968 status. into ( )
7069}
@@ -187,11 +186,7 @@ fn main() -> ExitCode {
187186/// - `base_nixpkgs`: Path to the base Nixpkgs to run ratchet checks against.
188187/// - `main_nixpkgs`: Path to the main Nixpkgs to check.
189188/// - `config`: The by-name configuration object
190- fn process (
191- base_nixpkgs : & Path ,
192- main_nixpkgs : & Path ,
193- config : & Config ,
194- ) -> Status {
189+ fn process ( base_nixpkgs : & Path , main_nixpkgs : & Path , config : & Config ) -> Status {
195190 // println!("{}:{}: base_nixpkgs {base_nixpkgs:?}, main_nixpkgs {main_nixpkgs:?}", file!(), line!());
196191 let ( base_result, main_result) = std:: thread:: scope ( |s| {
197192 let base_thread = s. spawn ( move || check_nixpkgs ( base_nixpkgs, config) ) ;
@@ -230,9 +225,13 @@ fn process(
230225 let main_result = main_result. unwrap ( ) ;
231226 match ( base_result, main_result) {
232227 ( Failure ( base_errors) , Failure ( errors) ) => {
233- println ! ( "{}:{}: base_errors {base_errors:?}, main errors {errors:?}" , file!( ) , line!( ) ) ;
228+ println ! (
229+ "{}:{}: base_errors {base_errors:?}, main errors {errors:?}" ,
230+ file!( ) ,
231+ line!( )
232+ ) ;
234233 Status :: BranchStillBroken ( errors)
235- } ,
234+ }
236235 ( Success ( ..) , Failure ( errors) ) => Status :: ProblemsIntroduced ( errors) ,
237236 ( Failure ( ..) , Success ( ..) ) => Status :: BranchHealed ,
238237 ( Success ( base) , Success ( main) ) => {
@@ -251,10 +250,7 @@ fn process(
251250/// This does not include ratchet checks, see ../README.md#ratchet-checks
252251/// Instead a `ratchet::Nixpkgs` value is returned, whose `compare` method allows performing the
253252/// ratchet check against another result.
254- fn check_nixpkgs (
255- nixpkgs_path : & Path ,
256- config : & Config ,
257- ) -> validation:: Result < ratchet:: Nixpkgs > {
253+ fn check_nixpkgs ( nixpkgs_path : & Path , config : & Config ) -> validation:: Result < ratchet:: Nixpkgs > {
258254 let nixpkgs_path = nixpkgs_path. canonicalize ( ) . with_context ( || {
259255 format ! (
260256 "Nixpkgs path {} could not be resolved" ,
@@ -265,7 +261,7 @@ fn check_nixpkgs(
265261 let mut nix_file_store = NixFileStore :: default ( ) ;
266262
267263 let package_result = {
268- let structure = check_structure ( & nixpkgs_path, & mut nix_file_store, config) ?;
264+ let structure = check_structure ( & nixpkgs_path, & mut nix_file_store, config) ?;
269265
270266 // Only if we could successfully parse the structure, we do the evaluation checks
271267 structure. result_map ( |package_names| {
0 commit comments