@@ -78,16 +78,14 @@ impl FormatOptions {
78
78
/// * `ellipsis`: Ellipsis for indicating overflow.
79
79
/// * `fmt_elem`: A function that formats an element in the list, given the
80
80
/// formatter and the index of the item in the list.
81
- fn format_with_overflow < F > (
81
+ fn format_with_overflow (
82
82
f : & mut fmt:: Formatter < ' _ > ,
83
83
length : usize ,
84
84
limit : usize ,
85
85
separator : & str ,
86
86
ellipsis : & str ,
87
- mut fmt_elem : F ,
87
+ fmt_elem : & mut dyn FnMut ( & mut fmt :: Formatter , usize ) -> fmt :: Result
88
88
) -> fmt:: Result
89
- where
90
- F : FnMut ( & mut fmt:: Formatter < ' _ > , usize ) -> fmt:: Result ,
91
89
{
92
90
if length == 0 {
93
91
// no-op
@@ -146,7 +144,7 @@ where
146
144
fmt_opt. collapse_limit ( 0 ) ,
147
145
", " ,
148
146
ELLIPSIS ,
149
- |f, index| format ( & view[ index] , f) ,
147
+ & mut |f, index| format ( & view[ index] , f) ,
150
148
) ?;
151
149
f. write_str ( "]" ) ?;
152
150
}
@@ -162,7 +160,7 @@ where
162
160
163
161
f. write_str ( "[" ) ?;
164
162
let limit = fmt_opt. collapse_limit ( full_ndim - depth - 1 ) ;
165
- format_with_overflow ( f, shape[ 0 ] , limit, & separator, ELLIPSIS , |f, index| {
163
+ format_with_overflow ( f, shape[ 0 ] , limit, & separator, ELLIPSIS , & mut |f, index| {
166
164
format_array (
167
165
& view. index_axis ( Axis ( 0 ) , index) ,
168
166
f,
0 commit comments