]> git.lizzy.rs Git - rust.git/commitdiff
fix tidy
authorJorge Aparicio <jorge@japaric.io>
Sat, 1 Sep 2018 19:44:35 +0000 (21:44 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 9 Oct 2018 06:58:02 +0000 (08:58 +0200)
src/etc/gdb_rust_pretty_printing.py

index 686c2c447f6ce342cefc5ebe30060248719402d1..b1252f386df364dcd18708dc5bc6139fe465e0dd 100755 (executable)
@@ -322,7 +322,8 @@ class RustStdBTreeSetPrinter(object):
     def children(self):
         (length, data_ptr) = \
             rustpp.extract_length_and_ptr_from_std_btreeset(self.__val)
-        maybe_uninit_keys = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3)
+        leaf_node = GdbValue(data_ptr.get_wrapped_value().dereference())
+        maybe_uninit_keys = leaf_node.get_child_at_index(3)
         manually_drop_keys = maybe_uninit_keys.get_child_at_index(1)
         keys = manually_drop_keys.get_child_at_index(0)
         gdb_ptr = keys.get_wrapped_value()
@@ -347,11 +348,12 @@ class RustStdBTreeMapPrinter(object):
     def children(self):
         (length, data_ptr) = \
             rustpp.extract_length_and_ptr_from_std_btreemap(self.__val)
-        maybe_uninit_keys = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3)
+        leaf_node = GdbValue(data_ptr.get_wrapped_value().dereference())
+        maybe_uninit_keys = leaf_node.get_child_at_index(3)
         manually_drop_keys = maybe_uninit_keys.get_child_at_index(1)
         keys = manually_drop_keys.get_child_at_index(0)
         keys_ptr = keys.get_wrapped_value()
-        maybe_uninit_vals = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(4)
+        maybe_uninit_vals = leaf_node.get_child_at_index(4)
         manually_drop_vals = maybe_uninit_vals.get_child_at_index(1)
         vals = manually_drop_vals.get_child_at_index(0)
         vals_ptr = vals.get_wrapped_value()