File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ use std::borrow::Cow;
40
40
use std:: cell:: { Cell , RefCell } ;
41
41
use std:: collections:: HashSet ;
42
42
use std:: default:: Default ;
43
+ use std:: fmt;
43
44
use std:: io;
44
45
use std:: mem;
45
46
use std:: rc:: { Rc , Weak } ;
@@ -56,6 +57,7 @@ use ExpandedName;
56
57
use QualName ;
57
58
58
59
/// The different kinds of nodes in the DOM.
60
+ #[ derive( Debug ) ]
59
61
pub enum NodeData {
60
62
/// The `Document` itself - the root node of a HTML document.
61
63
Document ,
@@ -120,6 +122,15 @@ impl Node {
120
122
}
121
123
}
122
124
125
+ impl fmt:: Debug for Node {
126
+ fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
127
+ fmt. debug_struct ( "Node" )
128
+ . field ( "data" , & self . data )
129
+ . field ( "children" , & self . children )
130
+ . finish ( )
131
+ }
132
+ }
133
+
123
134
/// Reference to a DOM node.
124
135
pub type Handle = Rc < Node > ;
125
136
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ pub enum SetResult {
43
43
/// Internally it uses [`VecDeque`] and has the same complexity properties.
44
44
///
45
45
/// [`VecDeque`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html
46
+ #[ derive( Debug ) ]
46
47
pub struct BufferQueue {
47
48
/// Buffers to process.
48
49
buffers : VecDeque < StrTendril > ,
You can’t perform that action at this time.
0 commit comments