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 {
296
296
pub ( crate ) read_rendered_cci : bool ,
297
297
/// If `true` (default) write the shared cross-crate information to the doc root
298
298
pub ( crate ) write_rendered_cci : bool ,
299
- /// Copies these folders into our doc root.
299
+ /// Copies these externally documented crates into our doc root.
300
300
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.
303
302
pub ( crate ) parts_paths : Vec < PathToParts > ,
304
- /// Where to write the cross- crate information parts
303
+ /// Where to write crate-info.json.
305
304
pub ( crate ) parts_out_dir : Option < PathToParts > ,
306
305
}
307
306
@@ -931,7 +930,7 @@ fn parse_extern_html_roots(
931
930
#[ derive( Clone , Debug ) ]
932
931
pub ( crate ) struct PathToDocSubdirectory ( pub PathBuf ) ;
933
932
934
- /// Path to cci root, including doc.parts, but not the crate name
933
+ /// Path to crate-info.json
935
934
///
936
935
/// For example, `/home/user/project/target/doc.parts/<crate>/crate-info.json`.
937
936
#[ derive( Clone , Debug ) ]
Original file line number Diff line number Diff line change @@ -322,6 +322,8 @@ impl CciPart for AllCratesPart {
322
322
}
323
323
impl PartsAndLocations < AllCratesPart > {
324
324
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
325
327
let path = PathBuf :: from ( "crates.js" ) ;
326
328
Ok ( Self :: with ( path, crate_name_json) )
327
329
}
@@ -849,7 +851,7 @@ impl Serialize for AliasSerializableImpl {
849
851
850
852
/// Create all parents
851
853
fn 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) ;
853
855
// TODO: check cache for whether this directory has already been created
854
856
try_err ! ( cx. shared. fs. create_dir_all( parent) , parent) ;
855
857
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments