@@ -8,23 +8,23 @@ const PREFIX_LOCAL_DIR: &str = "/home/gh-zjp-CN/distributed-verification/";
88const PREFIX_CI_DIR : & str = "/home/runner/work/distributed-verification/distributed-verification/" ;
99
1010/// Read kani-list.json generated from verify-rust-std CI.
11- fn read_kani_list_json ( ) -> Result < KaniListJson > {
11+ fn read_kani_list_json ( ) -> KaniListJson {
1212 const KANI_LIST_JSON : & str = "tmp/ubuntu-latest-kani-list.json/kani-list.json" ;
1313 const PREFIX : & str = "/home/runner/work/verify-rust-std/verify-rust-std/library/" ;
1414
15- let mut kani_list: KaniListJson = read_file ( KANI_LIST_JSON ) ? ;
15+ let mut kani_list: KaniListJson = read_file ( KANI_LIST_JSON ) . unwrap ( ) ;
1616 kani_list. normalize_file_path ( ) ;
17- kani_list. strip_path_prefix_raw ( PREFIX ) ? ;
17+ kani_list. strip_path_prefix_raw ( PREFIX ) ;
1818 kani_list. strip_path_closure_name ( & [ PREFIX , PREFIX_LOCAL_DIR , PREFIX_CI_DIR ] ) ;
19- Ok ( kani_list)
19+ kani_list
2020}
2121
22- fn read_core_json ( ) -> Result < Vec < SerFunction > > {
22+ fn read_core_json ( ) -> Vec < SerFunction > {
2323 const CORE_JSON : & str = "./assets/core.json" ;
2424 const PREFIX_LOCAL : & str = "/home/gh-zjp-CN/distributed-verification/verify-rust-std/library/" ;
2525 const PREFIX_CI : & str = "/home/runner/work/distributed-verification/distributed-verification/verify-rust-std/library/" ;
2626
27- let mut v: Vec < SerFunction > = read_file ( CORE_JSON ) ? ;
27+ let mut v: Vec < SerFunction > = read_file ( CORE_JSON ) . unwrap ( ) ;
2828 for func in & mut v {
2929 // strip_path_closure_name
3030 func. name = func
@@ -35,12 +35,12 @@ fn read_core_json() -> Result<Vec<SerFunction>> {
3535 . replace ( PREFIX_CI_DIR , "" )
3636 . into ( ) ;
3737 }
38- Ok ( v )
38+ v
3939}
4040
4141#[ test]
42- fn core_json ( ) -> Result < ( ) > {
43- let v_func = read_core_json ( ) ? ;
42+ fn core_json ( ) {
43+ let v_func = read_core_json ( ) ;
4444 let merged = MergedHarnesses :: new ( & v_func) ;
4545
4646 #[ derive( Debug ) ]
@@ -58,13 +58,11 @@ fn core_json() -> Result<()> {
5858 }
5959 "# ] ]
6060 . assert_debug_eq ( & count) ;
61-
62- Ok ( ( ) )
6361}
6462
6563#[ test]
66- fn read ( ) -> Result < ( ) > {
67- let kani_list = read_kani_list_json ( ) ? ;
64+ fn read ( ) {
65+ let kani_list = read_kani_list_json ( ) ;
6866 expect ! [ [ r#"
6967 Totals {
7068 standard_harnesses: 8350,
@@ -77,7 +75,7 @@ fn read() -> Result<()> {
7775 let harness_names = kani_list. harness_names ( |file, _| file. starts_with ( "core/" ) ) ;
7876 expect_file ! [ "snapshots/verify-rust-std/harness_names.txt" ] . assert_debug_eq ( & harness_names) ;
7977
80- let v_func = read_core_json ( ) ? ;
78+ let v_func = read_core_json ( ) ;
8179 let merged = MergedHarnesses :: new ( & v_func) ;
8280
8381 let function_names = merged. function_names ( |f| f. file . starts_with ( "core/" ) ) ;
@@ -89,6 +87,4 @@ fn read() -> Result<()> {
8987 . collect ( ) ;
9088 expect_file ! [ "snapshots/verify-rust-std/names_not_in_functions.txt" ]
9189 . assert_debug_eq ( & names_not_in_functions) ;
92-
93- Ok ( ( ) )
9490}
0 commit comments