-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-add serde support to NetworkInterface
In #255, the ipnetwork crate was added. IpNetwork did not yet support Serde, so (de)serialization support using such had to be removed. As of achanda/ipnetwork@c9e25e1, IpNetwork includes feature-gated serde support This snippet did not function prior to my changes, but seems to function fine after re-implementing serde support for IpNetwork ```rust pub fn get_network_interfaces() -> anyhow::Result<Value> { let raw_interfaces: Vec<NetworkInterface> = interfaces(); Ok(json!(raw_interfaces)) } ``` Since this is now supported upstream, it seems like a low-risk change.
- Loading branch information
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters