Skip to content

Commit

Permalink
Make clippy happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob McWhirter authored and bobmcwhirter committed Mar 18, 2024
1 parent 1362307 commit c1549ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ingestors/src/advisory/osv/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ impl<'g> OsvLoader<'g> {
todo!()
}
Package::Purl { purl } => {
if let Ok(purl) = Purl::from_str(&purl) {
if let Ok(purl) = Purl::from_str(purl) {
for range in affected.ranges.iter().flatten() {
let parsed_range = events_to_range(&range.events);
if let (Some(start), Some(end)) = &parsed_range {
advisory_vuln
.ingest_affected_package_range(
purl.clone(),
&start,
&end,
start,
end,
&tx,
)
.await?;
Expand Down Expand Up @@ -89,7 +89,7 @@ impl<'g> OsvLoader<'g> {
}
}

fn events_to_range(events: &Vec<Event>) -> (Option<String>, Option<String>) {
fn events_to_range(events: &[Event]) -> (Option<String>, Option<String>) {
let start = events.iter().find_map(|e| {
if let Event::Introduced(version) = e {
Some(version.clone())
Expand Down

0 comments on commit c1549ec

Please sign in to comment.