Print a more helpful debug message when creating an element in the HTML parser.

Using {:?} prints a debugging representation such as

  collections::string::String{
    vec: collections::vec::Vec<u8>{
      len: 4u,
      cap: 4u,
      ptr: (0x7f75670285d8 as *mut ())
    }
  }

which is not very helpful.
This commit is contained in:
Ms2ger 2014-07-07 16:48:13 +02:00
parent 7babb6d104
commit 7852bcd626

View file

@ -369,7 +369,7 @@ pub fn parse_html(page: &Page,
}
},
create_element: |tag: Box<hubbub::Tag>| {
debug!("create element {:?}", tag.name.clone());
debug!("create element {}", tag.name);
// NOTE: tmp vars are workaround for lifetime issues. Both required.
let tmp_borrow = doc_cell.borrow();
let tmp = &*tmp_borrow;