From 7852bcd626133ef1c3c82658512f56fd66a54772 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 7 Jul 2014 16:48:13 +0200 Subject: [PATCH] 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{ len: 4u, cap: 4u, ptr: (0x7f75670285d8 as *mut ()) } } which is not very helpful. --- src/components/script/html/hubbub_html_parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs index baacfcef52c..5f4184b5dea 100644 --- a/src/components/script/html/hubbub_html_parser.rs +++ b/src/components/script/html/hubbub_html_parser.rs @@ -369,7 +369,7 @@ pub fn parse_html(page: &Page, } }, create_element: |tag: Box| { - 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;