fix behavior
This commit is contained in:
parent
b95f6f2e8f
commit
6e562d24c6
@ -308,13 +308,13 @@ class RustStdBTreeSetPrinter(object):
|
||||
|
||||
@staticmethod
|
||||
def display_hint():
|
||||
return "map"
|
||||
return "array"
|
||||
|
||||
def to_string(self):
|
||||
(length, data_ptr) = \
|
||||
rustpp.extract_length_and_ptr_from_std_btreeset(self.__val)
|
||||
return (self.__val.type.get_unqualified_type_name() +
|
||||
(" with %i elements" % length))
|
||||
("(len: %i)" % length))
|
||||
|
||||
def children(self):
|
||||
(length, data_ptr) = \
|
||||
@ -322,7 +322,6 @@ class RustStdBTreeSetPrinter(object):
|
||||
val = GdbValue(data_ptr.get_wrapped_value().dereference()).get_child_at_index(3)
|
||||
gdb_ptr = val.get_wrapped_value()
|
||||
for index in xrange(length):
|
||||
yield (str(index), str(index))
|
||||
yield (str(index), gdb_ptr[index])
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
// gdb-command: run
|
||||
|
||||
// gdb-command: print btree_set
|
||||
// gdb-check:$1 = BTreeSet<i32> with 3 elements = {[0] = 3, [1] = 5, [2] = 7}
|
||||
// gdb-check:$1 = BTreeSet<i32>(len: 3) = {3, 5, 7}
|
||||
|
||||
// gdb-command: print vec_deque
|
||||
// gdb-check:$2 = VecDeque<i32>(len: 3, cap: 8) = {5, 3, 7}
|
||||
|
Loading…
Reference in New Issue
Block a user