try! -> ?
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
This commit is contained in:
@@ -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>")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user