Skip to content

Commit e8eabd4

Browse files
committed
remove unused argument
1 parent 343c69a commit e8eabd4

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/docbuilder/rustwide_builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,7 @@ impl RustwideBuilder {
522522
}
523523

524524
info!("{} {}", source.display(), dest.display());
525-
copy_doc_dir(source, dest, self.rustc_version.trim())?;
526-
Ok(())
525+
copy_doc_dir(source, dest)
527526
}
528527

529528
fn upload_docs(

src/utils/copy.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,17 @@ use regex::Regex;
1414
///
1515
/// This function is designed to avoid file duplications. It is using rustc version string
1616
/// to rename common files (css files, jquery.js, playpen.js, main.js etc.) in a standard rustdoc.
17-
pub fn copy_doc_dir<P: AsRef<Path>>(target: P,
18-
destination: P,
19-
rustc_version: &str)
20-
-> Result<()> {
17+
pub fn copy_doc_dir<P: AsRef<Path>>(target: P, destination: P) -> Result<()> {
2118
let source = PathBuf::from(target.as_ref()).join("doc");
2219
copy_files_and_handle_html(source,
2320
destination.as_ref().to_path_buf(),
24-
true,
25-
rustc_version)
21+
true)
2622
}
2723

2824

2925
fn copy_files_and_handle_html(source: PathBuf,
3026
destination: PathBuf,
31-
handle_html: bool,
32-
rustc_version: &str)
27+
handle_html: bool)
3328
-> Result<()> {
3429

3530
// FIXME: handle_html is useless since we started using --resource-suffix
@@ -57,8 +52,7 @@ fn copy_files_and_handle_html(source: PathBuf,
5752
fs::create_dir_all(&destination_full_path)?;
5853
copy_files_and_handle_html(file.path(),
5954
destination_full_path,
60-
handle_html,
61-
&rustc_version)?
55+
handle_html)?
6256
} else if handle_html && dup_regex.is_match(&file.file_name().into_string().unwrap()[..]) {
6357
continue;
6458
} else {
@@ -84,7 +78,7 @@ mod test {
8478
let destination = tempdir::TempDir::new("cratesfyi").unwrap();
8579

8680
// lets try to copy a src directory to tempdir
87-
let res = copy_dir(Path::new("src"), destination.path());
81+
let res = copy_doc_dir(Path::new("src"), destination.path());
8882
// remove temp dir
8983
fs::remove_dir_all(destination.path()).unwrap();
9084

0 commit comments

Comments
 (0)