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;
4040use std:: cell:: { Cell , RefCell } ;
4141use std:: collections:: HashSet ;
4242use std:: default:: Default ;
43+ use std:: fmt;
4344use std:: io;
4445use std:: mem;
4546use std:: rc:: { Rc , Weak } ;
@@ -56,6 +57,7 @@ use ExpandedName;
5657use QualName ;
5758
5859/// The different kinds of nodes in the DOM.
60+ #[ derive( Debug ) ]
5961pub enum NodeData {
6062 /// The `Document` itself - the root node of a HTML document.
6163 Document ,
@@ -120,6 +122,15 @@ impl Node {
120122 }
121123}
122124
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+
123134/// Reference to a DOM node.
124135pub type Handle = Rc < Node > ;
125136
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ pub enum SetResult {
4343/// Internally it uses [`VecDeque`] and has the same complexity properties.
4444///
4545/// [`VecDeque`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html
46+ #[ derive( Debug ) ]
4647pub struct BufferQueue {
4748 /// Buffers to process.
4849 buffers : VecDeque < StrTendril > ,
You can’t perform that action at this time.
0 commit comments