mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 11:22:26 +00:00
net_util: Fix usage of deprecated mac_address method
This fixes the build warning below warning: use of deprecated item 'tap::tests::pnet::datalink::NetworkInterface::mac_address': Please use NetworkInterface's field 'mac' instead. --> net_util/src/tap.rs:530:24 | 530 | (interface.mac_address(), tx, rx) | ^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default Signed-off-by: Anatol Belski <ab@php.net>
This commit is contained in:
parent
bf37ebdcb6
commit
5343b0ac18
@ -527,7 +527,7 @@ mod tests {
|
|||||||
let interface = interfaces.into_iter().find(interface_name_matches).unwrap();
|
let interface = interfaces.into_iter().find(interface_name_matches).unwrap();
|
||||||
|
|
||||||
if let Ok(Ethernet(tx, rx)) = datalink::channel(&interface, Default::default()) {
|
if let Ok(Ethernet(tx, rx)) = datalink::channel(&interface, Default::default()) {
|
||||||
(interface.mac_address(), tx, rx)
|
(interface.mac.unwrap(), tx, rx)
|
||||||
} else {
|
} else {
|
||||||
panic!("datalink channel error or unhandled channel type");
|
panic!("datalink channel error or unhandled channel type");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user