]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Trivially simplify rust_language::print_enum
authorTom Tromey <tom@tromey.com>
Thu, 9 Feb 2023 19:13:08 +0000 (12:13 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 9 Feb 2023 19:17:13 +0000 (12:17 -0700)
commit8ac460b742bc7f49acbcd78f8822386f56814055
tree76fc4392125ae23b7c8985f49b6ca26925571df4
parentb695fdd9b2494a64db1fb8e584753a1a5afec494
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.
gdb/rust-lang.c