diff --git a/src/grab/kev.rs b/src/grab/kev.rs index b91994c..e9db829 100644 --- a/src/grab/kev.rs +++ b/src/grab/kev.rs @@ -1,5 +1,3 @@ -use std::usize; - use async_trait::async_trait; use chrono::{DateTime, FixedOffset}; use reqwest::header::{self}; diff --git a/src/grab/mod.rs b/src/grab/mod.rs index fc649da..8916051 100644 --- a/src/grab/mod.rs +++ b/src/grab/mod.rs @@ -44,25 +44,13 @@ impl From for VulnInfo { _ => Severity::Low, }; - let references = match v.references { - Some(references) => references, - None => Vec::new(), - }; + let references = v.references.unwrap_or_default(); - let tags = match v.tags { - Some(tags) => tags, - None => Vec::new(), - }; + let tags = v.tags.unwrap_or_default(); - let reasons = match v.reasons { - Some(reasons) => reasons, - None => Vec::new(), - }; + let reasons = v.reasons.unwrap_or_default(); - let github_search = match v.github_search { - Some(github_search) => github_search, - None => Vec::new(), - }; + let github_search = v.github_search.unwrap_or_default(); VulnInfo { unique_key: v.key,