Skip to content

Commit c74b639

Browse files
remove unnecessary conversion
1 parent eefa2e3 commit c74b639

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

cli/src/cmd_net.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,14 +1781,11 @@ async fn create_current(settings_id: Uuid, client: &Client) -> Result<SwitchPort
17811781
routes: current
17821782
.routes
17831783
.iter()
1784-
.map(|x| {
1785-
let gw: oxnet::IpNet = x.gw.to_string().parse().unwrap();
1786-
Route {
1787-
dst: x.dst.clone(),
1788-
gw: gw.addr(),
1789-
vid: x.vlan_id,
1790-
rib_priority: x.rib_priority,
1791-
}
1784+
.map(|x| Route {
1785+
dst: x.dst.clone(),
1786+
gw: x.gw,
1787+
vid: x.vlan_id,
1788+
rib_priority: x.rib_priority,
17921789
})
17931790
.collect(),
17941791
};

0 commit comments

Comments
 (0)