File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ use std:: fmt;
1
2
use std:: ops:: Deref ;
2
3
use std:: slice;
3
4
@@ -11,7 +12,7 @@ use std::slice;
11
12
/// Note though that we don't actually use uninitialized memory. We generally
12
13
/// reuse allocations, so the initial allocation cost is bareable. However,
13
14
/// its other properties listed above are extremely useful.
14
- #[ derive( Clone , Debug ) ]
15
+ #[ derive( Clone ) ]
15
16
pub struct SparseSet {
16
17
/// Dense contains the instruction pointers in the order in which they
17
18
/// were inserted.
@@ -60,6 +61,12 @@ impl SparseSet {
60
61
}
61
62
}
62
63
64
+ impl fmt:: Debug for SparseSet {
65
+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
66
+ write ! ( f, "SparseSet({:?})" , self . dense)
67
+ }
68
+ }
69
+
63
70
impl Deref for SparseSet {
64
71
type Target = [ usize ] ;
65
72
You can’t perform that action at this time.
0 commit comments