File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -222,15 +222,16 @@ impl clean::Generics {
222222 cx : & ' a Context < ' tcx > ,
223223 ) -> impl fmt:: Display + ' a + Captures < ' tcx > {
224224 display_fn ( move |f| {
225- let real_params =
226- self . params . iter ( ) . filter ( |p| !p. is_synthetic_type_param ( ) ) . collect :: < Vec < _ > > ( ) ;
227- if real_params. is_empty ( ) {
225+ let mut real_params =
226+ self . params . iter ( ) . filter ( |p| !p. is_synthetic_type_param ( ) ) . peekable ( ) ;
227+ if real_params. peek ( ) . is_none ( ) {
228228 return Ok ( ( ) ) ;
229229 }
230+
230231 if f. alternate ( ) {
231- write ! ( f, "<{:#}>" , comma_sep( real_params. iter ( ) . map( |g| g. print( cx) ) ) )
232+ write ! ( f, "<{:#}>" , comma_sep( real_params. map( |g| g. print( cx) ) ) )
232233 } else {
233- write ! ( f, "<{}>" , comma_sep( real_params. iter ( ) . map( |g| g. print( cx) ) ) )
234+ write ! ( f, "<{}>" , comma_sep( real_params. map( |g| g. print( cx) ) ) )
234235 }
235236 } )
236237 }
You can’t perform that action at this time.
0 commit comments