mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
Trivially simplify rust_language::print_enum
rust_language::print_enum computes: int nfields = variant_type->num_fields (); ... but then does not reuse this in one spot. This patch corrects the oversight.
This commit is contained in:
@ -495,7 +495,7 @@ rust_language::print_enum (struct value *val, struct ui_file *stream,
|
||||
}
|
||||
|
||||
bool first_field = true;
|
||||
for (int j = 0; j < variant_type->num_fields (); j++)
|
||||
for (int j = 0; j < nfields; j++)
|
||||
{
|
||||
if (!first_field)
|
||||
gdb_puts (", ", stream);
|
||||
|
Reference in New Issue
Block a user