@@ -69,19 +69,17 @@ impl<O: IsA<ListStore>> GtkListStoreExtManual for O {
69
69
for ( column, value) in columns_and_values {
70
70
assert ! (
71
71
* column < n_columns,
72
- "got column {} which is higher than the number of columns {}" ,
72
+ "got column {} which is higher than the number of columns {n_columns }" ,
73
73
* column,
74
- n_columns
75
74
) ;
76
75
let type_ = from_glib ( ffi:: gtk_tree_model_get_column_type (
77
76
self . as_ref ( ) . upcast_ref :: < TreeModel > ( ) . to_glib_none ( ) . 0 ,
78
77
* column as c_int ,
79
78
) ) ;
80
79
assert ! (
81
80
Value :: type_transformable( value. value_type( ) , type_) ,
82
- "column {} is of type {} but found value of type {}" ,
81
+ "column {} is of type {type_ } but found value of type {}" ,
83
82
* column,
84
- type_,
85
83
value. value_type( )
86
84
) ;
87
85
}
@@ -117,8 +115,7 @@ impl<O: IsA<ListStore>> GtkListStoreExtManual for O {
117
115
let safe_count = count as usize == new_order. len ( ) ;
118
116
debug_assert ! (
119
117
safe_count,
120
- "Incorrect `new_order` slice length. Expected `{}`, found `{}`." ,
121
- count,
118
+ "Incorrect `new_order` slice length. Expected `{count}`, found `{}`." ,
122
119
new_order. len( )
123
120
) ;
124
121
let safe_values = new_order. iter ( ) . max ( ) . map_or ( true , |& max| {
@@ -128,9 +125,8 @@ impl<O: IsA<ListStore>> GtkListStoreExtManual for O {
128
125
debug_assert ! (
129
126
safe_values,
130
127
"Some `new_order` slice values are out of range. Maximum safe value: \
131
- `{}`. The slice contents: `{:?}`",
128
+ `{}`. The slice contents: `{new_order :?}`",
132
129
count - 1 ,
133
- new_order
134
130
) ;
135
131
if safe_count && safe_values {
136
132
ffi:: gtk_list_store_reorder (
@@ -148,26 +144,23 @@ impl<O: IsA<ListStore>> GtkListStoreExtManual for O {
148
144
) as u32 ;
149
145
assert ! (
150
146
columns_and_values. len( ) <= n_columns as usize ,
151
- "got values for {} columns but only {} columns exist" ,
147
+ "got values for {} columns but only {n_columns } columns exist" ,
152
148
columns_and_values. len( ) ,
153
- n_columns
154
149
) ;
155
150
for ( column, value) in columns_and_values {
156
151
assert ! (
157
152
* column < n_columns,
158
- "got column {} which is higher than the number of columns {}" ,
153
+ "got column {} which is higher than the number of columns {n_columns }" ,
159
154
* column,
160
- n_columns
161
155
) ;
162
156
let type_ = from_glib ( ffi:: gtk_tree_model_get_column_type (
163
157
self . as_ref ( ) . upcast_ref :: < TreeModel > ( ) . to_glib_none ( ) . 0 ,
164
158
* column as c_int ,
165
159
) ) ;
166
160
assert ! (
167
161
Value :: type_transformable( value. value_type( ) , type_) ,
168
- "column {} is of type {} but found value of type {}" ,
162
+ "column {} is of type {type_ } but found value of type {}" ,
169
163
* column,
170
- type_,
171
164
value. value_type( )
172
165
) ;
173
166
}
@@ -198,9 +191,7 @@ impl<O: IsA<ListStore>> GtkListStoreExtManual for O {
198
191
) as u32 ;
199
192
assert ! (
200
193
column < columns,
201
- "got column {} which is higher than the number of columns {}" ,
202
- column,
203
- columns
194
+ "got column {column} which is higher than the number of columns {columns}" ,
204
195
) ;
205
196
206
197
let type_ = from_glib ( ffi:: gtk_tree_model_get_column_type (
@@ -209,9 +200,7 @@ impl<O: IsA<ListStore>> GtkListStoreExtManual for O {
209
200
) ) ;
210
201
assert ! (
211
202
Value :: type_transformable( value. type_( ) , type_) ,
212
- "column {} is of type {} but found value of type {}" ,
213
- column,
214
- type_,
203
+ "column {column} is of type {type_} but found value of type {}" ,
215
204
value. type_( )
216
205
) ;
217
206
0 commit comments