@@ -79,7 +79,7 @@ impl HtmlHandlebars {
79
79
let filepath = Path :: new ( & ch. path ) . with_extension ( "html" ) ;
80
80
let rendered = self . post_process (
81
81
rendered,
82
- & normalize_path ( filepath. to_str ( ) . ok_or ( Error :: from (
82
+ & normalize_path ( filepath. to_str ( ) . ok_or_else ( || Error :: from (
83
83
format ! ( "Bad file name: {}" , filepath. display( ) ) ,
84
84
) ) ?) ,
85
85
ctx. book . get_html_config ( ) . get_playpen_config ( ) ,
@@ -129,8 +129,8 @@ impl HtmlHandlebars {
129
129
filepath : & str ,
130
130
playpen_config : & PlaypenConfig )
131
131
-> String {
132
- let rendered = build_header_links ( & rendered, & filepath) ;
133
- let rendered = fix_anchor_links ( & rendered, & filepath) ;
132
+ let rendered = build_header_links ( & rendered, filepath) ;
133
+ let rendered = fix_anchor_links ( & rendered, filepath) ;
134
134
let rendered = fix_code_blocks ( & rendered) ;
135
135
let rendered = add_playpen_pre ( & rendered, playpen_config) ;
136
136
@@ -470,7 +470,7 @@ fn id_from_content(content: &str) -> String {
470
470
}
471
471
472
472
// Remove spaces and hastags indicating a header
473
- let trimmed = content. trim ( ) . trim_left_matches ( "#" ) . trim ( ) ;
473
+ let trimmed = content. trim ( ) . trim_left_matches ( '#' ) . trim ( ) ;
474
474
475
475
normalize_id ( trimmed)
476
476
}
0 commit comments