@@ -188,12 +188,7 @@ impl HirDisplay for Struct {
188
188
StructKind :: Record => {
189
189
let has_where_clause = write_where_clause ( def_id, f) ?;
190
190
if let Some ( limit) = f. entity_limit {
191
- display_fields_or_variants (
192
- & self . fields ( f. db ) ,
193
- has_where_clause,
194
- limit,
195
- f,
196
- ) ?;
191
+ display_fields_or_variants ( & self . fields ( f. db ) , has_where_clause, limit, f) ?;
197
192
}
198
193
}
199
194
StructKind :: Unit => _ = write_where_clause ( def_id, f) ?,
@@ -213,12 +208,7 @@ impl HirDisplay for Enum {
213
208
214
209
let has_where_clause = write_where_clause ( def_id, f) ?;
215
210
if let Some ( limit) = f. entity_limit {
216
- display_fields_or_variants (
217
- & self . variants ( f. db ) ,
218
- has_where_clause,
219
- limit,
220
- f,
221
- ) ?;
211
+ display_fields_or_variants ( & self . variants ( f. db ) , has_where_clause, limit, f) ?;
222
212
}
223
213
224
214
Ok ( ( ) )
@@ -235,12 +225,7 @@ impl HirDisplay for Union {
235
225
236
226
let has_where_clause = write_where_clause ( def_id, f) ?;
237
227
if let Some ( limit) = f. entity_limit {
238
- display_fields_or_variants (
239
- & self . fields ( f. db ) ,
240
- has_where_clause,
241
- limit,
242
- f,
243
- ) ?;
228
+ display_fields_or_variants ( & self . fields ( f. db ) , has_where_clause, limit, f) ?;
244
229
}
245
230
Ok ( ( ) )
246
231
}
@@ -251,7 +236,7 @@ fn display_fields_or_variants<T: HirDisplay>(
251
236
has_where_clause : bool ,
252
237
limit : usize ,
253
238
f : & mut HirFormatter < ' _ > ,
254
- ) -> Result < ( ) , HirDisplayError > {
239
+ ) -> Result < ( ) , HirDisplayError > {
255
240
let count = fields_or_variants. len ( ) . min ( limit) ;
256
241
f. write_char ( if !has_where_clause { ' ' } else { '\n' } ) ?;
257
242
if count == 0 {
0 commit comments