@@ -18,18 +18,19 @@ use std::path::Path;
18
18
use utils:: { copy_doc_dir, parse_rustc_version, CargoMetadata } ;
19
19
use Metadata ;
20
20
21
- static USER_AGENT : & str = "docs.rs builder (https://github.com/rust-lang/docs.rs)" ;
22
- static DEFAULT_RUSTWIDE_WORKSPACE : & str = ".rustwide" ;
21
+ const USER_AGENT : & str = "docs.rs builder (https://github.com/rust-lang/docs.rs)" ;
22
+ const DEFAULT_RUSTWIDE_WORKSPACE : & str = ".rustwide" ;
23
23
24
- static TARGETS : & [ & str ] = & [
24
+ const DEFAULT_TARGET : & str = "x86_64-unknown-linux-gnu" ;
25
+ const TARGETS : & [ & str ] = & [
25
26
"i686-pc-windows-msvc" ,
26
27
"i686-unknown-linux-gnu" ,
27
28
"x86_64-apple-darwin" ,
28
29
"x86_64-pc-windows-msvc" ,
29
30
"x86_64-unknown-linux-gnu" ,
30
31
] ;
31
32
32
- static ESSENTIAL_FILES_VERSIONED : & [ & str ] = & [
33
+ const ESSENTIAL_FILES_VERSIONED : & [ & str ] = & [
33
34
"brush.svg" ,
34
35
"wheel.svg" ,
35
36
"down-arrow.svg" ,
@@ -46,7 +47,7 @@ static ESSENTIAL_FILES_VERSIONED: &[&str] = &[
46
47
"noscript.css" ,
47
48
"rust-logo.png" ,
48
49
] ;
49
- static ESSENTIAL_FILES_UNVERSIONED : & [ & str ] = & [
50
+ const ESSENTIAL_FILES_UNVERSIONED : & [ & str ] = & [
50
51
"FiraSans-Medium.woff" ,
51
52
"FiraSans-Regular.woff" ,
52
53
"SourceCodePro-Regular.woff" ,
@@ -56,8 +57,8 @@ static ESSENTIAL_FILES_UNVERSIONED: &[&str] = &[
56
57
"SourceSerifPro-It.ttf.woff" ,
57
58
] ;
58
59
59
- static DUMMY_CRATE_NAME : & str = "acme-client" ;
60
- static DUMMY_CRATE_VERSION : & str = "0.0.0" ;
60
+ const DUMMY_CRATE_NAME : & str = "acme-client" ;
61
+ const DUMMY_CRATE_VERSION : & str = "0.0.0" ;
61
62
62
63
pub struct RustwideBuilder {
63
64
workspace : Workspace ,
@@ -363,6 +364,7 @@ impl RustwideBuilder {
363
364
res. cargo_metadata . root ( ) ,
364
365
& build. host_source_dir ( ) ,
365
366
& res. result ,
367
+ & res. target ,
366
368
files_list,
367
369
successful_targets,
368
370
& CratesIoData :: get_from_network ( res. cargo_metadata . root ( ) ) ?,
@@ -481,8 +483,7 @@ impl RustwideBuilder {
481
483
successful,
482
484
} ,
483
485
cargo_metadata,
484
- target : target. unwrap_or ( "x86_64-unknown-linux-gnu" ) . to_string ( ) ,
485
- default_target : metadata. default_target . clone ( ) ,
486
+ target : target. unwrap_or ( DEFAULT_TARGET ) . to_string ( ) ,
486
487
} )
487
488
}
488
489
@@ -530,7 +531,6 @@ impl RustwideBuilder {
530
531
struct FullBuildResult {
531
532
result : BuildResult ,
532
533
target : String ,
533
- default_target : Option < String > ,
534
534
cargo_metadata : CargoMetadata ,
535
535
}
536
536
@@ -539,5 +539,4 @@ pub(crate) struct BuildResult {
539
539
pub ( crate ) docsrs_version : String ,
540
540
pub ( crate ) build_log : String ,
541
541
pub ( crate ) successful : bool ,
542
- pub ( crate ) target : String ,
543
542
}
0 commit comments