@@ -214,8 +214,8 @@ pub struct RenderOptions {
214
214
pub themes : Vec < StylePath > ,
215
215
/// If present, CSS file that contains rules to add to the default CSS.
216
216
pub extension_css : Option < PathBuf > ,
217
- /// A map of crate names to the URL to use instead of querying the crate's `html_root_url`.
218
- pub extern_html_root_urls : BTreeMap < String , String > ,
217
+ /// A map of crate sources to the URL to use instead of querying the crate's `html_root_url`.
218
+ pub extern_html_root_urls : BTreeMap < PathBuf , String > ,
219
219
/// A map of the default settings (values are as for DOM storage API). Keys should lack the
220
220
/// `rustdoc-` prefix.
221
221
pub default_settings : HashMap < String , String > ,
@@ -690,13 +690,13 @@ fn check_deprecated_options(matches: &getopts::Matches, diag: &rustc_errors::Han
690
690
/// describing the issue.
691
691
fn parse_extern_html_roots (
692
692
matches : & getopts:: Matches ,
693
- ) -> Result < BTreeMap < String , String > , & ' static str > {
693
+ ) -> Result < BTreeMap < PathBuf , String > , & ' static str > {
694
694
let mut externs = BTreeMap :: new ( ) ;
695
695
for arg in & matches. opt_strs ( "extern-html-root-url" ) {
696
696
let mut parts = arg. splitn ( 2 , '=' ) ;
697
697
let name = parts. next ( ) . ok_or ( "--extern-html-root-url must not be empty" ) ?;
698
698
let url = parts. next ( ) . ok_or ( "--extern-html-root-url must be of the form name=url" ) ?;
699
- externs. insert ( name. to_string ( ) , url. to_string ( ) ) ;
699
+ externs. insert ( name. into ( ) , url. to_string ( ) ) ;
700
700
}
701
701
702
702
Ok ( externs)
0 commit comments