@@ -26,16 +26,16 @@ impl<'a> FmtVisitor<'a> {
26
26
if bound_lifetimes. len ( ) > 0 {
27
27
format ! ( "for<{}> {}: {}" ,
28
28
bound_lifetimes. iter( ) . map( |l| self . rewrite_lifetime_def( l) )
29
- . collect:: <Vec <_>>( ) . connect ( ", " ) ,
29
+ . collect:: <Vec <_>>( ) . join ( ", " ) ,
30
30
pprust:: ty_to_string( bounded_ty) ,
31
31
bounds. iter( ) . map( |b| self . rewrite_ty_bound( b) )
32
- . collect:: <Vec <_>>( ) . connect ( " + " ) )
32
+ . collect:: <Vec <_>>( ) . join ( " + " ) )
33
33
34
34
} else {
35
35
format ! ( "{}: {}" ,
36
36
pprust:: ty_to_string( bounded_ty) ,
37
37
bounds. iter( ) . map( |b| self . rewrite_ty_bound( b) )
38
- . collect:: <Vec <_>>( ) . connect ( " + " ) )
38
+ . collect:: <Vec <_>>( ) . join ( " + " ) )
39
39
}
40
40
}
41
41
& ast:: WherePredicate :: RegionPredicate ( ast:: WhereRegionPredicate { ref lifetime,
@@ -44,7 +44,7 @@ impl<'a> FmtVisitor<'a> {
44
44
format ! ( "{}: {}" ,
45
45
pprust:: lifetime_to_string( lifetime) ,
46
46
bounds. iter( ) . map( |l| pprust:: lifetime_to_string( l) )
47
- . collect:: <Vec <_>>( ) . connect ( " + " ) )
47
+ . collect:: <Vec <_>>( ) . join ( " + " ) )
48
48
}
49
49
& ast:: WherePredicate :: EqPredicate ( ast:: WhereEqPredicate { ref path, ref ty, ..} ) => {
50
50
format ! ( "{} = {}" , pprust:: path_to_string( path) , pprust:: ty_to_string( ty) )
@@ -60,7 +60,7 @@ impl<'a> FmtVisitor<'a> {
60
60
format ! ( "{}: {}" ,
61
61
pprust:: lifetime_to_string( & lifetime. lifetime) ,
62
62
lifetime. bounds. iter( ) . map( |l| pprust:: lifetime_to_string( l) )
63
- . collect:: <Vec <_>>( ) . connect ( " + " ) )
63
+ . collect:: <Vec <_>>( ) . join ( " + " ) )
64
64
}
65
65
66
66
pub fn rewrite_ty_bound ( & self , bound : & ast:: TyParamBound ) -> String {
@@ -83,7 +83,7 @@ impl<'a> FmtVisitor<'a> {
83
83
if ty_param. bounds . len ( ) > 0 {
84
84
result. push_str ( ": " ) ;
85
85
result. push_str ( & ty_param. bounds . iter ( ) . map ( |b| self . rewrite_ty_bound ( b) )
86
- . collect :: < Vec < _ > > ( ) . connect ( " + " ) ) ;
86
+ . collect :: < Vec < _ > > ( ) . join ( " + " ) ) ;
87
87
}
88
88
if let Some ( ref def) = ty_param. default {
89
89
result. push_str ( " = " ) ;
@@ -97,7 +97,7 @@ impl<'a> FmtVisitor<'a> {
97
97
if t. bound_lifetimes . len ( ) > 0 {
98
98
format ! ( "for<{}> {}" ,
99
99
t. bound_lifetimes. iter( ) . map( |l| self . rewrite_lifetime_def( l) )
100
- . collect:: <Vec <_>>( ) . connect ( ", " ) ,
100
+ . collect:: <Vec <_>>( ) . join ( ", " ) ,
101
101
pprust:: path_to_string( & t. trait_ref. path) )
102
102
103
103
} else {
0 commit comments