diff options
Diffstat (limited to 'src/librustdoc/html/toc.rs')
| -rw-r--r-- | src/librustdoc/html/toc.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/toc.rs b/src/librustdoc/html/toc.rs index 53be8b5bc06..b9d41471d41 100644 --- a/src/librustdoc/html/toc.rs +++ b/src/librustdoc/html/toc.rs @@ -183,15 +183,15 @@ impl fmt::Debug for Toc { impl fmt::Display for Toc { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - try!(write!(fmt, "<ul>")); + write!(fmt, "<ul>")?; for entry in &self.entries { // recursively format this table of contents (the // `{children}` is the key). - try!(write!(fmt, + write!(fmt, "\n<li><a href=\"#{id}\">{num} {name}</a>{children}</li>", id = entry.id, num = entry.sec_number, name = entry.name, - children = entry.children)) + children = entry.children)? } write!(fmt, "</ul>") } |
