@@ -34,10 +34,7 @@ fn load_all_errors(metadata_dir: &Path) -> Result<ErrorMetadataMap, Box<Error>>
34
34
let path = try!( entry) . path ( ) ;
35
35
36
36
let mut metadata_str = String :: new ( ) ;
37
- try!(
38
- File :: open ( & path) . and_then ( |mut f|
39
- f. read_to_string ( & mut metadata_str) )
40
- ) ;
37
+ try!( File :: open ( & path) . and_then ( |mut f| f. read_to_string ( & mut metadata_str) ) ) ;
41
38
42
39
let some_errors: ErrorMetadataMap = try!( json:: decode ( & metadata_str) ) ;
43
40
@@ -78,24 +75,23 @@ r##"<!DOCTYPE html>
78
75
// Enclose each error in a div so they can be shown/hidden en masse.
79
76
let desc_desc = match info. description {
80
77
Some ( _) => "error-described" ,
81
- None => "error-undescribed"
78
+ None => "error-undescribed" ,
82
79
} ;
83
80
let use_desc = match info. use_site {
84
81
Some ( _) => "error-used" ,
85
- None => "error-unused"
82
+ None => "error-unused" ,
86
83
} ;
87
84
try!( write ! ( & mut output_file, "<div class=\" {} {}\" >" , desc_desc, use_desc) ) ;
88
85
89
86
// Error title (with self-link).
90
87
try!( write ! ( & mut output_file,
91
- "<h2 id=\" {0}\" class=\" section-header\" ><a href=\" #{0}\" >{0}</a></h2>\n " ,
92
- err_code
93
- ) ) ;
88
+ "<h2 id=\" {0}\" class=\" section-header\" ><a href=\" #{0}\" >{0}</a></h2>\n " ,
89
+ err_code) ) ;
94
90
95
91
// Description rendered as markdown.
96
92
match info. description {
97
93
Some ( ref desc) => try!( write ! ( & mut output_file, "{}" , Markdown ( desc) ) ) ,
98
- None => try!( write ! ( & mut output_file, "<p>No description.</p>\n " ) )
94
+ None => try!( write ! ( & mut output_file, "<p>No description.</p>\n " ) ) ,
99
95
}
100
96
101
97
try!( write ! ( & mut output_file, "</div>\n " ) ) ;
0 commit comments