File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,7 @@ use regex::Regex;
16
16
/// to rename common files (css files, jquery.js, playpen.js, main.js etc.) in a standard rustdoc.
17
17
pub fn copy_doc_dir < P : AsRef < Path > > ( target : P , destination : P ) -> Result < ( ) > {
18
18
let source = PathBuf :: from ( target. as_ref ( ) ) . join ( "doc" ) ;
19
- copy_files_and_handle_html ( source,
20
- destination. as_ref ( ) . to_path_buf ( ) ,
21
- true )
22
- }
23
-
24
-
25
- fn copy_files_and_handle_html ( source : PathBuf ,
26
- destination : PathBuf ,
27
- handle_html : bool )
28
- -> Result < ( ) > {
19
+ let destination = destination. as_ref ( ) . to_path_buf ( ) ;
29
20
30
21
// FIXME: handle_html is useless since we started using --resource-suffix
31
22
// argument with rustdoc
@@ -50,10 +41,8 @@ fn copy_files_and_handle_html(source: PathBuf,
50
41
51
42
if metadata. is_dir ( ) {
52
43
fs:: create_dir_all ( & destination_full_path) ?;
53
- copy_files_and_handle_html ( file. path ( ) ,
54
- destination_full_path,
55
- handle_html) ?
56
- } else if handle_html && dup_regex. is_match ( & file. file_name ( ) . into_string ( ) . unwrap ( ) [ ..] ) {
44
+ copy_doc_dir ( file. path ( ) , destination_full_path) ?
45
+ } else if dup_regex. is_match ( & file. file_name ( ) . into_string ( ) . unwrap ( ) [ ..] ) {
57
46
continue ;
58
47
} else {
59
48
fs:: copy ( & file. path ( ) , & destination_full_path) ?;
You can’t perform that action at this time.
0 commit comments