Skip to content

Commit

Permalink
Simplify how has_bonus_display is accumulated
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 10, 2024
1 parent 9cc1d0b commit 7046023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion impl/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ impl Display<'_> {
Some(_) => Trait::Display,
None => {
bonus_display = true;
has_bonus_display = true;
Trait::Display
}
};
Expand Down Expand Up @@ -144,7 +145,6 @@ impl Display<'_> {
} else {
binding_value.into_token_stream()
};
has_bonus_display |= bonus_display;
bindings.push((formatvar.to_local(), wrapped_binding_value));
}

Expand Down

0 comments on commit 7046023

Please sign in to comment.