Skip to content

Commit

Permalink
From<Vec<StandardCommunity>>
Browse files Browse the repository at this point in the history
  • Loading branch information
density215 committed Jun 24, 2024
1 parent 155dda2 commit 7fa2c49
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bgp/message/update_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,16 @@ impl StandardCommunitiesList {
// TODO fn add_community_from_iter()
}

impl From<Vec<StandardCommunity>> for StandardCommunitiesList {
fn from(value: Vec<StandardCommunity>) -> Self {
let mut std_l = Self::new();
for c in value {
std_l.add_community(c)
}
std_l
}
}

//------------ Errors --------------------------------------------------------

#[derive(Debug)]
Expand Down

0 comments on commit 7fa2c49

Please # to comment.