File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ mod execs {
25
25
}
26
26
27
27
28
- // TODO: Drop after error_chain is fixed
29
- #[ allow( unused_doc_comment) ]
30
28
error_chain ! {
31
29
foreign_links {
32
30
Io ( std:: io:: Error ) ;
Original file line number Diff line number Diff line change @@ -100,8 +100,6 @@ pub use book::BookItem;
100
100
pub use renderer:: Renderer ;
101
101
102
102
/// The error types used through out this crate.
103
- // TODO: Drop after error_chain is fixed
104
- #[ allow( unused_doc_comment) ]
105
103
pub mod errors {
106
104
error_chain ! {
107
105
foreign_links {
Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ impl HtmlHandlebars {
66
66
let filepath = Path :: new ( & ch. path ) . with_extension ( "html" ) ;
67
67
let rendered = self . post_process ( rendered,
68
68
& normalize_path ( filepath. to_str ( )
69
- . expect ( & format ! ( "Bad file name: {}" , filepath. display( ) ) ) ) ,
70
- ctx. book . get_html_config ( ) . get_playpen_config ( ) ) ;
69
+ . ok_or ( Error :: from ( format ! ( "Bad file name: {}" , filepath. display( ) ) ) ) ?) ,
70
+ ctx. book . get_html_config ( ) . get_playpen_config ( )
71
+ ) ;
71
72
72
73
// Write to file
73
74
info ! ( "[*] Creating {:?} ✓" , filepath. display( ) ) ;
@@ -458,7 +459,7 @@ fn id_from_content(content: &str) -> String {
458
459
let mut content = content. to_string ( ) ;
459
460
460
461
// Skip any tags or html-encoded stuff
461
- static REPL_SUB : & [ & str ] = & [
462
+ const REPL_SUB : & [ & str ] = & [
462
463
"<em>" ,
463
464
"</em>" ,
464
465
"<code>" ,
You can’t perform that action at this time.
0 commit comments