@@ -31,22 +31,21 @@ pub(crate) fn github_events(repo: &str, token: &Option<String>) -> Result<Vec<Ra
3131 let body = match resp. text ( ) {
3232 Ok ( body) => {
3333 if body. len ( ) <= "[]" . len ( ) {
34- debug ! ( "No more content for {:?} (page number: {})" , repo , page ) ;
34+ debug ! ( "No more content for {repo :?} (page number: {page })" ) ;
3535 break ;
3636 }
37- debug ! ( "Content found for {:?} (page number: {})" , repo , page ) ;
37+ debug ! ( "Content found for {repo :?} (page number: {page })" ) ;
3838 trace ! (
39- "Content found for {:?} (page number: {}): {:?}" ,
40- repo, page, body
39+ "Content found for {repo:?} (page number: {page}): {body:?}"
4140 ) ;
4241 body
4342 }
4443 Err ( error) => {
4544 if error. status ( ) == Some ( reqwest:: StatusCode :: UNPROCESSABLE_ENTITY ) {
46- debug ! ( "No more content for {:?} (page number: {})" , repo , page ) ;
45+ debug ! ( "No more content for {repo :?} (page number: {page })" ) ;
4746 break ;
4847 }
49- debug ! ( "Oops, something went wrong with GitHub API {:?}" , error ) ;
48+ debug ! ( "Oops, something went wrong with GitHub API {error :?}" ) ;
5049 return Err ( Error :: other ( format ! (
5150 "Cannot get GitHub API content: {error}"
5251 ) ) ) ;
@@ -62,7 +61,7 @@ pub(crate) fn github_events(repo: &str, token: &Option<String>) -> Result<Vec<Ra
6261 Some ( link_header) => {
6362 let link_header = link_header. as_bytes ( ) ;
6463 let last_page = last_page_from_link_header ( str:: from_utf8 ( link_header) . unwrap ( ) ) ;
65- debug ! ( "Last page: {:?} (current page: {})" , last_page , page ) ;
64+ debug ! ( "Last page: {last_page :?} (current page: {page })" ) ;
6665 match last_page {
6766 Some ( last_page) => {
6867 if page == last_page {
@@ -79,7 +78,7 @@ pub(crate) fn github_events(repo: &str, token: &Option<String>) -> Result<Vec<Ra
7978}
8079
8180fn raw_github_events ( json : & str ) -> Result < Vec < RawEvent > , serde_json:: Error > {
82- debug ! ( "{}" , json ) ;
81+ debug ! ( "{json}" ) ;
8382 serde_json:: from_str :: < Vec < RawEvent > > ( json)
8483}
8584
0 commit comments