mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
net_util: Fix clippy error
Make sure to explicitly declare trait objects with the keywork "dyn". Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
aface5bca2
commit
5f52dd2d1e
+3
-1
@@ -396,7 +396,9 @@ mod tests {
|
|||||||
// For a given interface name, this returns a tuple that contains the MAC address of the
|
// For a given interface name, this returns a tuple that contains the MAC address of the
|
||||||
// interface, an object that can be used to send Ethernet frames, and a receiver of
|
// interface, an object that can be used to send Ethernet frames, and a receiver of
|
||||||
// Ethernet frames arriving at the specified interface.
|
// Ethernet frames arriving at the specified interface.
|
||||||
fn pnet_get_mac_tx_rx(ifname: String) -> (MacAddr, Box<DataLinkSender>, Box<DataLinkReceiver>) {
|
fn pnet_get_mac_tx_rx(
|
||||||
|
ifname: String,
|
||||||
|
) -> (MacAddr, Box<dyn DataLinkSender>, Box<dyn DataLinkReceiver>) {
|
||||||
let interface_name_matches = |iface: &NetworkInterface| iface.name == ifname;
|
let interface_name_matches = |iface: &NetworkInterface| iface.name == ifname;
|
||||||
|
|
||||||
// Find the network interface with the provided name.
|
// Find the network interface with the provided name.
|
||||||
|
|||||||
Reference in New Issue
Block a user