From 1f0d9c17fd318d3add928d60fa5fc37dd19241b7 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Wed, 4 Nov 2026 23:25:53 +0100 Subject: [PATCH] fix: build_output_paths before the test module (clippy) Co-Authored-By: Claude Opus 5.5 --- compliance-agent/src/pipeline/orchestrator.rs | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/compliance-agent/src/pipeline/orchestrator.rs b/compliance-agent/src/pipeline/orchestrator.rs index 8f8d413..cb135e7 100644 --- a/compliance-agent/src/pipeline/orchestrator.rs +++ b/compliance-agent/src/pipeline/orchestrator.rs @@ -2980,6 +2980,25 @@ pub(super) fn extract_base_url(git_url: &str) -> Option { } } +/// 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, +) -> Vec { + 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, -) -> Vec { - 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() -}