Skip to content

Commit 7fa2c49

Browse files
committed
From<Vec<StandardCommunity>>
1 parent 155dda2 commit 7fa2c49

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/bgp/message/update_builder.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,16 @@ impl StandardCommunitiesList {
12481248
// TODO fn add_community_from_iter()
12491249
}
12501250

1251+
impl From<Vec<StandardCommunity>> for StandardCommunitiesList {
1252+
fn from(value: Vec<StandardCommunity>) -> Self {
1253+
let mut std_l = Self::new();
1254+
for c in value {
1255+
std_l.add_community(c)
1256+
}
1257+
std_l
1258+
}
1259+
}
1260+
12511261
//------------ Errors --------------------------------------------------------
12521262

12531263
#[derive(Debug)]

0 commit comments

Comments
 (0)