fix(audit): remove unwrap from target shutdown path (#2668)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Henry Guo
2026-04-24 17:25:11 +08:00
committed by GitHub
parent 92f812fc80
commit 2705e3f53b
+2 -2
View File
@@ -200,8 +200,8 @@ impl AuditRegistry {
}
}
if !errors.is_empty() {
return Err(AuditError::Target(errors.into_iter().next().unwrap()));
if let Some(error) = errors.into_iter().next() {
return Err(AuditError::Target(error));
}
Ok(())