File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: error:: Result ;
2
- use crate :: web:: { report_error , rustdoc:: RustdocPage } ;
3
- use anyhow:: { anyhow , Context } ;
2
+ use crate :: web:: rustdoc:: RustdocPage ;
3
+ use anyhow:: Context ;
4
4
use rinja:: Template ;
5
5
use std:: { fmt, sync:: Arc } ;
6
6
use tracing:: trace;
@@ -267,16 +267,8 @@ impl IconType {
267
267
IconType :: Brand => font_awesome_as_a_crate:: Type :: Brands ,
268
268
} ;
269
269
270
- let icon_file_string = match font_awesome_as_a_crate:: svg ( type_, icon_name) {
271
- Ok ( s) => s,
272
- Err ( err) => {
273
- report_error ( & anyhow ! ( err) . context ( format ! (
274
- "error trying to render icon with name \" {}\" " ,
275
- icon_name
276
- ) ) ) ;
277
- ""
278
- }
279
- } ;
270
+ let icon_file_string = font_awesome_as_a_crate:: svg ( type_, icon_name)
271
+ . map_err ( |err| rinja:: Error :: Custom ( Box :: new ( err) ) ) ?;
280
272
281
273
let mut classes = vec ! [ "fa-svg" ] ;
282
274
if fw {
You can’t perform that action at this time.
0 commit comments