@@ -245,20 +245,23 @@ async fn test_oracle_set_update_and_delete_pair() {
245245 . expect ( "failed to parse account_objects result" ) ;
246246 assert_eq ! ( result. account_objects. len( ) , 1 ) ;
247247 let oracle = & result. account_objects [ 0 ] ;
248-
248+
249249 let series = oracle[ "PriceDataSeries" ]
250250 . as_array ( )
251251 . expect ( "PriceDataSeries should be a JSON array in the Oracle ledger entry" ) ;
252- assert_eq ! ( series. len( ) , 2 , "Expected 2 pairs after deleting one and adding one" ) ;
252+ assert_eq ! (
253+ series. len( ) ,
254+ 2 ,
255+ "Expected 2 pairs after deleting one and adding one"
256+ ) ;
253257
254258 // Find XRP/USD pair
255259 let usd_pair = series
256260 . iter ( )
257261 . find ( |p| p[ "PriceData" ] [ "QuoteAsset" ] == "USD" )
258262 . expect ( "XRP/USD pair should be present after update" ) ;
259263 assert_eq ! (
260- usd_pair[ "PriceData" ] [ "AssetPrice" ] ,
261- "2e5" ,
264+ usd_pair[ "PriceData" ] [ "AssetPrice" ] , "2e5" ,
262265 "XRP/USD AssetPrice should have been updated to 0x2E5"
263266 ) ;
264267
@@ -268,16 +271,18 @@ async fn test_oracle_set_update_and_delete_pair() {
268271 . find ( |p| p[ "PriceData" ] [ "QuoteAsset" ] == "JPY" )
269272 . expect ( "XRP/JPY pair should be present after being added" ) ;
270273 assert_eq ! (
271- jpy_pair[ "PriceData" ] [ "AssetPrice" ] ,
272- "3a98" ,
274+ jpy_pair[ "PriceData" ] [ "AssetPrice" ] , "3a98" ,
273275 "XRP/JPY AssetPrice should be 0x3A98 (15000)"
274276 ) ;
275277
276278 // Ensure XRP/EUR is deleted
277279 let eur_pair = series
278280 . iter ( )
279281 . find ( |p| p[ "PriceData" ] [ "QuoteAsset" ] == "EUR" ) ;
280- assert ! ( eur_pair. is_none( ) , "XRP/EUR should have been deleted by omitting AssetPrice/Scale" ) ;
282+ assert ! (
283+ eur_pair. is_none( ) ,
284+ "XRP/EUR should have been deleted by omitting AssetPrice/Scale"
285+ ) ;
281286 } )
282287 . await ;
283288}
@@ -340,8 +345,7 @@ async fn test_oracle_set_tec_token_pair_not_found() {
340345 . await ;
341346
342347 assert_eq ! (
343- engine_result,
344- "tecTOKEN_PAIR_NOT_FOUND" ,
348+ engine_result, "tecTOKEN_PAIR_NOT_FOUND" ,
345349 "Deleting a pair that does not exist should return tecTOKEN_PAIR_NOT_FOUND"
346350 ) ;
347351 // Advance the ledger so the consumed sequence number is finalised and
@@ -476,8 +480,7 @@ async fn test_oracle_set_tec_invalid_update_time() {
476480 . await ;
477481
478482 assert_eq ! (
479- engine_result,
480- "tecINVALID_UPDATE_TIME" ,
483+ engine_result, "tecINVALID_UPDATE_TIME" ,
481484 "LastUpdateTime older than the stored value should return tecINVALID_UPDATE_TIME"
482485 ) ;
483486 crate :: common:: ledger_accept ( ) . await ;
0 commit comments