@@ -31,22 +31,19 @@ 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) ;
38- trace ! (
39- "Content found for {:?} (page number: {}): {:?}" ,
40- repo, page, body
41- ) ;
37+ debug ! ( "Content found for {repo:?} (page number: {page})" ) ;
38+ trace ! ( "Content found for {repo:?} (page number: {page}): {body:?}" ) ;
4239 body
4340 }
4441 Err ( error) => {
4542 if error. status ( ) == Some ( reqwest:: StatusCode :: UNPROCESSABLE_ENTITY ) {
46- debug ! ( "No more content for {:?} (page number: {})" , repo , page ) ;
43+ debug ! ( "No more content for {repo :?} (page number: {page })" ) ;
4744 break ;
4845 }
49- debug ! ( "Oops, something went wrong with GitHub API {:?}" , error ) ;
46+ debug ! ( "Oops, something went wrong with GitHub API {error :?}" ) ;
5047 return Err ( Error :: other ( format ! (
5148 "Cannot get GitHub API content: {error}"
5249 ) ) ) ;
@@ -62,7 +59,7 @@ pub(crate) fn github_events(repo: &str, token: &Option<String>) -> Result<Vec<Ra
6259 Some ( link_header) => {
6360 let link_header = link_header. as_bytes ( ) ;
6461 let last_page = last_page_from_link_header ( str:: from_utf8 ( link_header) . unwrap ( ) ) ;
65- debug ! ( "Last page: {:?} (current page: {})" , last_page , page ) ;
62+ debug ! ( "Last page: {last_page :?} (current page: {page })" ) ;
6663 match last_page {
6764 Some ( last_page) => {
6865 if page == last_page {
@@ -79,7 +76,7 @@ pub(crate) fn github_events(repo: &str, token: &Option<String>) -> Result<Vec<Ra
7976}
8077
8178fn raw_github_events ( json : & str ) -> Result < Vec < RawEvent > , serde_json:: Error > {
82- debug ! ( "{}" , json ) ;
79+ debug ! ( "{json}" ) ;
8380 serde_json:: from_str :: < Vec < RawEvent > > ( json)
8481}
8582
0 commit comments