Skip to content

Commit b246297

Browse files
committed
w
1 parent ccc2a9b commit b246297

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

src/transform/intralinks/rustdoc.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,13 @@ fn run_rustdoc(
479479

480480
let rustdoc_crate = crate_from_file(&rustdoc_json_path)?;
481481

482-
if rustdoc_crate.format_version != EXPECTED_RUSTDOC_FORMAT_VERSION {
483-
return Err(IntralinkError::UnsupportedRustdocFormatVersion {
484-
version: rustdoc_crate.format_version,
482+
match rustdoc_crate.format_version {
483+
EXPECTED_RUSTDOC_FORMAT_VERSION => Ok(rustdoc_crate),
484+
format_version => Err(IntralinkError::UnsupportedRustdocFormatVersion {
485+
version: format_version,
485486
expected_version: EXPECTED_RUSTDOC_FORMAT_VERSION,
486-
});
487+
}),
487488
}
488-
489-
Ok(rustdoc_crate)
490489
}
491490

492491
pub fn create_intralink_resolver<'a>(
@@ -496,14 +495,12 @@ pub fn create_intralink_resolver<'a>(
496495
manifest_path: &PathBuf,
497496
config: &'a IntralinksConfig,
498497
) -> Result<IntralinkResolver<'a>, IntralinkError> {
499-
// WIP! we probably want to be able to configure which feature to have enabled when generating the code
500-
501498
let rustdoc_crate = run_rustdoc(package_target, workspace_package, manifest_path)?;
502499

503500
let mut items_info: HashMap<&ItemId, ItemInfo<'_>> =
504501
HashMap::with_capacity(rustdoc_crate.index.len());
505502

506-
// WIP! this should be in a function of it's own.
503+
// WIP!simple this should be in a function of it's own.
507504
for (item_id, item_summary) in rustdoc_crate.paths.iter() {
508505
let item_info = ItemInfo::from(item_summary, None, ItemContext::Normal);
509506

0 commit comments

Comments
 (0)