@@ -4,7 +4,7 @@ use distributed_verification::{
44 SerFunction ,
55 diff:: { KaniListJson , MergeHashKaniList } ,
66} ;
7- use std:: { collections:: HashMap , fs :: File } ;
7+ use std:: collections:: HashMap ;
88
99pub fn run ( args : & [ String ] ) -> Result < ( ) > {
1010 SubCmdMerge :: parse_from ( args) . run ( )
@@ -34,7 +34,11 @@ impl SubCmdMerge {
3434 fn run ( self ) -> Result < ( ) > {
3535 debug ! ( ?self ) ;
3636
37- let ( mut hash_json, mut kani_list) = read_json ( & self . hash_json , & self . kani_list ) ?;
37+ let mut hash_json: Vec < SerFunction > = crate :: read_json ( & self . hash_json ) ?;
38+
39+ let mut kani_list: KaniListJson = crate :: read_json ( & self . kani_list ) ?;
40+ // normalize paths like core/src/../../portable-simd/crates/core_simd/src/masks.rs
41+ kani_list. normalize_file_path ( ) ;
3842
3943 if !self . strip_kani_list_prefix . is_empty ( ) {
4044 kani_list. strip_path_prefix_raw ( & self . strip_kani_list_prefix ) ;
@@ -65,24 +69,3 @@ impl SubCmdMerge {
6569 Ok ( ( ) )
6670 }
6771}
68-
69- fn read_json (
70- hash_json_path : & str ,
71- kani_list_path : & str ,
72- ) -> Result < ( Vec < SerFunction > , KaniListJson ) > {
73- let hash_json: Vec < SerFunction > = {
74- let _span = error_span ! ( "hash_json_path" , hash_json_path) . entered ( ) ;
75- let file = File :: open ( hash_json_path) ?;
76- serde_json:: from_reader ( file) ?
77- } ;
78-
79- let mut kani_list: KaniListJson = {
80- let _span = error_span ! ( "kani_list_path" , kani_list_path) . entered ( ) ;
81- let file = File :: open ( kani_list_path) ?;
82- serde_json:: from_reader ( file) ?
83- } ;
84- // normalize paths like core/src/../../portable-simd/crates/core_simd/src/masks.rs
85- kani_list. normalize_file_path ( ) ;
86-
87- Ok ( ( hash_json, kani_list) )
88- }
0 commit comments