Skip to content

Commit 4cbd2e8

Browse files
fmt
1 parent eedf067 commit 4cbd2e8

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

  • devolutions-gateway/src/api

devolutions-gateway/src/api/net.rs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -281,21 +281,17 @@ impl From<interfaces::NetworkInterface> for NetworkInterface {
281281
let addr = iface
282282
.addr
283283
.into_iter()
284-
.map(|addr| {
285-
match addr {
286-
interfaces::Addr::V4(v4) => Addr::V4(V4IfAddr {
287-
ip: v4.ip,
288-
broadcast: v4.broadcast,
289-
netmask: v4.netmask.map(|netmask| Netmask(netmask)),
290-
}),
291-
interfaces::Addr::V6(v6) => {
292-
Addr::V6(V6IfAddr {
293-
ip: v6.ip,
294-
broadcast: v6.broadcast,
295-
netmask: v6.netmask.map(|netmask| Netmask(netmask)),
296-
})
297-
}
298-
}
284+
.map(|addr| match addr {
285+
interfaces::Addr::V4(v4) => Addr::V4(V4IfAddr {
286+
ip: v4.ip,
287+
broadcast: v4.broadcast,
288+
netmask: v4.netmask.map(|netmask| Netmask(netmask)),
289+
}),
290+
interfaces::Addr::V6(v6) => Addr::V6(V6IfAddr {
291+
ip: v6.ip,
292+
broadcast: v6.broadcast,
293+
netmask: v6.netmask.map(|netmask| Netmask(netmask)),
294+
}),
299295
})
300296
.collect();
301297

0 commit comments

Comments
 (0)