@@ -6,7 +6,7 @@ use axum::{
6
6
} ;
7
7
use reqwest:: { Request , Response } ;
8
8
use serde:: Deserialize ;
9
- use serde_json:: Value ;
9
+ use serde_json:: { json , Value } ;
10
10
use tracing:: { debug, info} ;
11
11
use uuid:: Uuid ;
12
12
use web_prover_core:: {
@@ -177,7 +177,7 @@ fn test_get_value_from_json_path() {
177
177
}
178
178
} ) ;
179
179
let path = vec ! [ JsonKey :: String ( "foo" . to_string( ) ) , JsonKey :: String ( "bar" . to_string( ) ) ] ;
180
- let value = get_value_from_json_path ( & json_body, & path) . unwrap ( ) ;
180
+ let value = get_value_from_json_path ( & json_body, & path) ;
181
181
assert_eq ! ( value, "baz" ) ;
182
182
}
183
183
@@ -187,7 +187,7 @@ fn test_get_value_from_json_path_num() {
187
187
"foo" : [ 1 , 2 , 3 ]
188
188
} ) ;
189
189
let path = vec ! [ JsonKey :: String ( "foo" . to_string( ) ) , JsonKey :: Num ( 1 ) ] ;
190
- let value = get_value_from_json_path ( & json_body, & path) . unwrap ( ) ;
190
+ let value = get_value_from_json_path ( & json_body, & path) ;
191
191
assert_eq ! ( value, 2 ) ;
192
192
}
193
193
@@ -199,7 +199,7 @@ fn test_get_value_from_json_path_bool() {
199
199
}
200
200
} ) ;
201
201
let path = vec ! [ JsonKey :: String ( "foo" . to_string( ) ) , JsonKey :: String ( "bar" . to_string( ) ) ] ;
202
- let value = get_value_from_json_path ( & json_body, & path) . unwrap ( ) ;
202
+ let value = get_value_from_json_path ( & json_body, & path) ;
203
203
assert_eq ! ( value, true ) ;
204
204
}
205
205
@@ -211,6 +211,6 @@ fn test_get_value_from_json_path_null() {
211
211
}
212
212
} ) ;
213
213
let path = vec ! [ JsonKey :: String ( "foo" . to_string( ) ) , JsonKey :: String ( "bar" . to_string( ) ) ] ;
214
- let value = get_value_from_json_path ( & json_body, & path) . unwrap ( ) ;
214
+ let value = get_value_from_json_path ( & json_body, & path) ;
215
215
assert_eq ! ( value, Value :: Null ) ;
216
216
}
0 commit comments