@@ -4,6 +4,7 @@ use async_trait::async_trait;
44use bytes:: Bytes ;
55use chrono:: { DateTime , FixedOffset , Utc } ;
66use futures:: { FutureExt , future:: BoxFuture } ;
7+ use itertools:: Itertools ;
78use octocrab:: models:: { Author , AuthorAssociation } ;
89use regex:: Regex ;
910use reqwest:: header:: { AUTHORIZATION , USER_AGENT } ;
@@ -1508,8 +1509,7 @@ impl Repository {
15081509 . chain ( [ format ! ( "sort={}" , ordering. sort) ] )
15091510 . chain ( [ format ! ( "direction={}" , ordering. direction) ] )
15101511 . chain ( [ format ! ( "per_page={}" , ordering. per_page) ] )
1511- . collect :: < Vec < _ > > ( )
1512- . join ( "&" ) ;
1512+ . format ( "&" ) ;
15131513 format ! (
15141514 "{}/repos/{}/{}?{}" ,
15151515 client. api_url, self . full_name, endpoint, filters
@@ -1531,8 +1531,7 @@ impl Repository {
15311531 . chain ( include_labels. iter ( ) . map ( |label| format ! ( "label:{label}" ) ) )
15321532 . chain ( exclude_labels. iter ( ) . map ( |label| format ! ( "-label:{label}" ) ) )
15331533 . chain ( [ format ! ( "repo:{}" , self . full_name) ] )
1534- . collect :: < Vec < _ > > ( )
1535- . join ( "+" ) ;
1534+ . format ( "+" ) ;
15361535 format ! (
15371536 "{}/search/issues?q={}&sort={}&order={}&per_page={}&page={}" ,
15381537 client. api_url,
@@ -1633,7 +1632,7 @@ impl Repository {
16331632 client : & GithubClient ,
16341633 refname : & str ,
16351634 ) -> anyhow:: Result < GitReference > {
1636- let url = format ! ( "{}/git/ref/{}" , self . url( client) , refname ) ;
1635+ let url = format ! ( "{}/git/ref/{refname }" , self . url( client) ) ;
16371636 client
16381637 . json ( client. get ( & url) )
16391638 . await
0 commit comments