fix: build_output_paths before the test module (clippy)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 3m54s
CI / Check (pull_request) Successful in 16m34s
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 3m54s
CI / Check (pull_request) Successful in 16m34s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eb7d7423ad
commit
1f0d9c17fd
1 file changed
+19
-19
@@ -2980,6 +2980,25 @@ pub(super) fn extract_base_url(git_url: &str) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
/// The ingested files of `target`'s build outputs (Yocto image SPDX
|
||||
/// archives), or the stored upload where ingest recorded no working path.
|
||||
fn build_output_paths(
|
||||
target: &OnboardedTarget,
|
||||
working_paths: &std::collections::HashMap<String, std::path::PathBuf>,
|
||||
) -> Vec<std::path::PathBuf> {
|
||||
target
|
||||
.artifacts
|
||||
.iter()
|
||||
.filter(|a| a.kind == ArtifactKind::BuildOutput)
|
||||
.filter_map(|a| {
|
||||
working_paths
|
||||
.get(&a.id)
|
||||
.cloned()
|
||||
.or_else(|| a.stored_path.as_deref().map(std::path::PathBuf::from))
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[allow(clippy::expect_used, clippy::unwrap_used)]
|
||||
mod tests {
|
||||
@@ -3082,22 +3101,3 @@ mod tests {
|
||||
assert_eq!(repo.checkout, code.id);
|
||||
}
|
||||
}
|
||||
|
||||
/// The ingested files of `target`'s build outputs (Yocto image SPDX
|
||||
/// archives), or the stored upload where ingest recorded no working path.
|
||||
fn build_output_paths(
|
||||
target: &OnboardedTarget,
|
||||
working_paths: &std::collections::HashMap<String, std::path::PathBuf>,
|
||||
) -> Vec<std::path::PathBuf> {
|
||||
target
|
||||
.artifacts
|
||||
.iter()
|
||||
.filter(|a| a.kind == ArtifactKind::BuildOutput)
|
||||
.filter_map(|a| {
|
||||
working_paths
|
||||
.get(&a.id)
|
||||
.cloned()
|
||||
.or_else(|| a.stored_path.as_deref().map(std::path::PathBuf::from))
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
Reference in new issue
Block a user