diff --git a/crate_universe/src/metadata/dependency.rs b/crate_universe/src/metadata/dependency.rs index fb716f31b9..91b2ddc037 100644 --- a/crate_universe/src/metadata/dependency.rs +++ b/crate_universe/src/metadata/dependency.rs @@ -367,7 +367,7 @@ fn get_library_target_name(package: &Package, potential_name: &str) -> Result { if let Some(maybe_manifest) = self.cache.get(path) { return maybe_manifest.clone(); } - let maybe_manifest = if let Ok(manifest) = Manifest::from_path(path) { - Some(manifest) - } else { - None - }; + let maybe_manifest = Manifest::from_path(path).ok(); self.cache.insert(path.clone(), maybe_manifest.clone()); maybe_manifest } diff --git a/util/collect_coverage/collect_coverage.rs b/util/collect_coverage/collect_coverage.rs index fcd3c0ad4f..22b57f7911 100644 --- a/util/collect_coverage/collect_coverage.rs +++ b/util/collect_coverage/collect_coverage.rs @@ -9,13 +9,11 @@ //! data files to compute the coverage report. //! //! This script assumes the following environment variables are set: -//! - COVERAGE_DIR Directory containing metadata files needed for -//! coverage collection (e.g. gcda files, profraw). -//! - COVERAGE_OUTPUT_FILE The coverage action output path. -//! - ROOT Location from where the code coverage collection -//! was invoked. -//! - RUNFILES_DIR Location of the test's runfiles. -//! - VERBOSE_COVERAGE Print debug info from the coverage scripts +//! - `COVERAGE_DIR``: Directory containing metadata files needed for coverage collection (e.g. gcda files, profraw). +//! - `COVERAGE_OUTPUT_FILE`: The coverage action output path. +//! - `ROOT`: Location from where the code coverage collection was invoked. +//! - `RUNFILES_DIR`: Location of the test's runfiles. +//! - `VERBOSE_COVERAGE`: Print debug info from the coverage scripts //! //! The script looks in $COVERAGE_DIR for the Rust metadata coverage files //! (profraw) and uses lcov to get the coverage data. The coverage data