Commit 5cd367eb authored by Max Verevkin's avatar Max Verevkin
Browse files

Interface: derive Default

parent b0418eae
......@@ -4,7 +4,7 @@ use neli::attr::Attribute;
use neli::err::DeError;
/// A struct representing a wifi interface
#[derive(Clone, Debug, PartialEq)]
#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct Interface {
/// A netlink interface index. This index is used to fetch extra information with nl80211
pub index: Option<Vec<u8>>,
......@@ -26,22 +26,6 @@ pub struct Interface {
pub device: Option<u64>,
}
impl Interface {
pub fn default() -> Interface {
Interface {
index: None,
ssid: None,
mac: None,
name: None,
frequency: None,
channel: None,
power: None,
phy: None,
device: None,
}
}
}
impl TryFrom<Attrs<'_, Nl80211Attr>> for Interface {
type Error = DeError;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment