@@ -11,16 +11,16 @@ use std::{
1111
1212use anyhow:: { anyhow, bail, ensure} ;
1313use chrono:: DateTime ;
14- use reqwest:: { header:: COOKIE , Url } ;
14+ use reqwest:: { Url , header:: COOKIE } ;
1515use serde:: Deserialize ;
1616use serde_json:: { self as json} ;
1717use spdlog:: prelude:: * ;
1818use tokio:: sync:: Mutex ;
1919
20- use super :: super :: { upgrade_to_https , Response } ;
20+ use super :: super :: { Response , upgrade_to_https } ;
2121use crate :: {
2222 config:: { Accessor , AsSecretRef , Config , Validator } ,
23- platform:: { bilibili :: bilibili_request_builder , PlatformMetadata , PlatformTraitStatic } ,
23+ platform:: { PlatformMetadata , PlatformTraitStatic , bilibili :: bilibili_request_builder } ,
2424 prop,
2525 source:: {
2626 FetcherTrait , Post , PostAttachment , PostAttachmentImage , PostContent , PostUrl , PostUrls ,
@@ -981,25 +981,23 @@ mod tests {
981981 let history = fetch_space_history ( 8047632 , & mut blocked, None )
982982 . await
983983 . unwrap ( ) ;
984- assert ! ( history. 0 . iter( ) . all( |post| !post
985- . urls
986- . major( )
987- . as_clickable( )
988- . unwrap( )
989- . url
990- . is_empty( ) ) ) ;
984+ assert ! (
985+ history
986+ . 0
987+ . iter( )
988+ . all( |post| !post. urls. major( ) . as_clickable( ) . unwrap( ) . url. is_empty( ) )
989+ ) ;
991990 assert ! ( history. 0 . iter( ) . all( |post| !post. content. is_empty( ) ) ) ;
992991
993992 let history = fetch_space_history ( 178362496 , & mut blocked, None )
994993 . await
995994 . unwrap ( ) ;
996- assert ! ( history. 0 . iter( ) . all( |post| !post
997- . urls
998- . major( )
999- . as_clickable( )
1000- . unwrap( )
1001- . url
1002- . is_empty( ) ) ) ;
995+ assert ! (
996+ history
997+ . 0
998+ . iter( )
999+ . all( |post| !post. urls. major( ) . as_clickable( ) . unwrap( ) . url. is_empty( ) )
1000+ ) ;
10031001 assert ! ( history. 0 . iter( ) . all( |post| !post. content. is_empty( ) ) ) ;
10041002 }
10051003}
0 commit comments