@@ -4,6 +4,7 @@ use async_trait::async_trait;
4
4
use bytes:: Bytes ;
5
5
use chrono:: { DateTime , FixedOffset , Utc } ;
6
6
use futures:: { FutureExt , future:: BoxFuture } ;
7
+ use itertools:: Itertools ;
7
8
use octocrab:: models:: { Author , AuthorAssociation } ;
8
9
use regex:: Regex ;
9
10
use reqwest:: header:: { AUTHORIZATION , USER_AGENT } ;
@@ -1508,8 +1509,7 @@ impl Repository {
1508
1509
. chain ( [ format ! ( "sort={}" , ordering. sort) ] )
1509
1510
. chain ( [ format ! ( "direction={}" , ordering. direction) ] )
1510
1511
. chain ( [ format ! ( "per_page={}" , ordering. per_page) ] )
1511
- . collect :: < Vec < _ > > ( )
1512
- . join ( "&" ) ;
1512
+ . format ( "&" ) ;
1513
1513
format ! (
1514
1514
"{}/repos/{}/{}?{}" ,
1515
1515
client. api_url, self . full_name, endpoint, filters
@@ -1531,8 +1531,7 @@ impl Repository {
1531
1531
. chain ( include_labels. iter ( ) . map ( |label| format ! ( "label:{label}" ) ) )
1532
1532
. chain ( exclude_labels. iter ( ) . map ( |label| format ! ( "-label:{label}" ) ) )
1533
1533
. chain ( [ format ! ( "repo:{}" , self . full_name) ] )
1534
- . collect :: < Vec < _ > > ( )
1535
- . join ( "+" ) ;
1534
+ . format ( "+" ) ;
1536
1535
format ! (
1537
1536
"{}/search/issues?q={}&sort={}&order={}&per_page={}&page={}" ,
1538
1537
client. api_url,
@@ -1633,7 +1632,7 @@ impl Repository {
1633
1632
client : & GithubClient ,
1634
1633
refname : & str ,
1635
1634
) -> anyhow:: Result < GitReference > {
1636
- let url = format ! ( "{}/git/ref/{}" , self . url( client) , refname ) ;
1635
+ let url = format ! ( "{}/git/ref/{refname }" , self . url( client) ) ;
1637
1636
client
1638
1637
. json ( client. get ( & url) )
1639
1638
. await
0 commit comments