Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
digizeph committed Oct 11, 2024
1 parent ba2872d commit b783487
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/rpki/cloudflare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ impl RpkiTrie {
let data: CfData =
oneio::read_json_struct::<CfData>("https://rpki.cloudflare.com/rpki.json")?;

let mut trie = RpkiTrie::default();
trie.aspas = data.aspas;
let mut trie = RpkiTrie {
aspas: data.aspas,
..Default::default()
};

for roa in data.roas {
let prefix = roa.prefix.parse::<IpNet>()?;
Expand Down
6 changes: 5 additions & 1 deletion src/rpki/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ impl Display for RpkiValidation {

impl RpkiTrie {
pub fn new(date: Option<NaiveDate>) -> Self {
Self::default()
Self {
trie: IpnetTrie::new(),
aspas: vec![],
date,
}
}

/// insert an [RoaEntry]. If old value exists, it is returned.
Expand Down

0 comments on commit b783487

Please sign in to comment.