File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -296,12 +296,11 @@ pub(crate) struct RenderOptions {
296296 pub ( crate ) read_rendered_cci : bool ,
297297 /// If `true` (default) write the shared cross-crate information to the doc root
298298 pub ( crate ) write_rendered_cci : bool ,
299- /// Copies these folders into our doc root.
299+ /// Copies these externally documented crates into our doc root.
300300 pub ( crate ) include_rendered_docs : Vec < PathToDocSubdirectory > ,
301- /// The location of the doc directory for externally located crates.
302- /// Absolute path ending in doc/.
301+ /// Path to crate-info.json for external crates.
303302 pub ( crate ) parts_paths : Vec < PathToParts > ,
304- /// Where to write the cross- crate information parts
303+ /// Where to write crate-info.json.
305304 pub ( crate ) parts_out_dir : Option < PathToParts > ,
306305}
307306
@@ -931,7 +930,7 @@ fn parse_extern_html_roots(
931930#[ derive( Clone , Debug ) ]
932931pub ( crate ) struct PathToDocSubdirectory ( pub PathBuf ) ;
933932
934- /// Path to cci root, including doc.parts, but not the crate name
933+ /// Path to crate-info.json
935934///
936935/// For example, `/home/user/project/target/doc.parts/<crate>/crate-info.json`.
937936#[ derive( Clone , Debug ) ]
Original file line number Diff line number Diff line change @@ -322,6 +322,8 @@ impl CciPart for AllCratesPart {
322322}
323323impl PartsAndLocations < AllCratesPart > {
324324 fn get ( crate_name_json : SortedJson ) -> Result < Self , Error > {
325+ // external hack_get_external_crate_names not needed here, because
326+ // there's no way that we write the search index but not crates.js
325327 let path = PathBuf :: from ( "crates.js" ) ;
326328 Ok ( Self :: with ( path, crate_name_json) )
327329 }
@@ -849,7 +851,7 @@ impl Serialize for AliasSerializableImpl {
849851
850852/// Create all parents
851853fn create_parents ( cx : & mut Context < ' _ > , path : & Path ) -> Result < ( ) , Error > {
852- let parent = path. parent ( ) . expect ( "trying to write to an empty path" ) ;
854+ let parent = try_none ! ( path. parent( ) , path) ;
853855 // TODO: check cache for whether this directory has already been created
854856 try_err ! ( cx. shared. fs. create_dir_all( parent) , parent) ;
855857 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments