Skip to content

Commit

Permalink
Update src/librustdoc/html/render/print_item.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
  • Loading branch information
Manishearth and Joshua Nelson authored Mar 22, 2021
1 parent 4580b12 commit 790218f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ fn render_union(
write!(w, " {{\n{}", tab);
let count_fields = fields
.iter()
.filter(|f| if let clean::StructFieldItem(..) = *f.kind { true } else { false })
.filter(|f| matches!(clean::StructFieldItem(..), *f.kind))
.count();
let toggle = should_hide_fields(count_fields);
if toggle {
Expand Down

0 comments on commit 790218f

Please sign in to comment.