Skip to content

Commit a21fbfe

Browse files
committed
remove unused handle_html argument
1 parent e8eabd4 commit a21fbfe

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/utils/copy.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,7 @@ use regex::Regex;
1616
/// to rename common files (css files, jquery.js, playpen.js, main.js etc.) in a standard rustdoc.
1717
pub fn copy_doc_dir<P: AsRef<Path>>(target: P, destination: P) -> Result<()> {
1818
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();
2920

3021
// FIXME: handle_html is useless since we started using --resource-suffix
3122
// argument with rustdoc
@@ -50,10 +41,8 @@ fn copy_files_and_handle_html(source: PathBuf,
5041

5142
if metadata.is_dir() {
5243
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()[..]) {
5746
continue;
5847
} else {
5948
fs::copy(&file.path(), &destination_full_path)?;

0 commit comments

Comments
 (0)