Skip to content

Commit 87c4997

Browse files
committed
Fix cargo clippy warnings
Signed-off-by: Gris Ge <[email protected]>
1 parent 2fd4c35 commit 87c4997

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/link/tests/bond.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// SPDX-License-Identifier: MIT
22

3-
use netlink_packet_core::{NetlinkHeader, NetlinkMessage, NetlinkPayload};
43
use netlink_packet_utils::{Emitable, Parseable};
54

65
use crate::link::link_flag::LinkFlags;
76
use crate::link::{
87
BondArpValidate, BondMode, BondPortState, InfoBond, InfoBondPort, InfoData,
98
InfoKind, InfoPortData, InfoPortKind, LinkAttribute, LinkHeader, LinkInfo,
10-
LinkLayerType, LinkMessage, LinkMessageBuffer, LinkXdp, Map, MiiStatus,
11-
State, Stats, Stats64,
9+
LinkLayerType, LinkMessage, LinkMessageBuffer, Map, MiiStatus,
10+
State,
1211
};
1312
use crate::{AddressFamily, RouteNetlinkMessage};
1413

src/link/tests/geneve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn test_geneve_link_info() {
4141
LinkInfo::Data(InfoData::Geneve(vec![
4242
InfoGeneve::Id(42),
4343
InfoGeneve::Remote6(
44-
Ipv6Addr::from_str("2001:db8::1").unwrap().into(),
44+
Ipv6Addr::from_str("2001:db8::1").unwrap(),
4545
),
4646
InfoGeneve::UdpZeroCsum6Tx(false),
4747
InfoGeneve::Ttl(10),

src/link/tests/vrf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ fn test_link_info_with_ifla_vrf_port_table() {
352352
};
353353
let link = LinkMessage::parse(&LinkMessageBuffer::new(&data)).unwrap();
354354
assert_eq!(expected, link);
355-
let mut buf = vec![0; data.len()];
355+
let _buf = vec![0; data.len()];
356356
// FIXME: the packet we write is not a perfect match with the
357357
// packet we received from the kernel.
358358
//

src/link/tests/vxlan.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,11 @@ fn test_parsing_link_vxlan() {
230230
LinkInfo::Data(InfoData::Vxlan(vec![
231231
InfoVxlan::Id(101),
232232
InfoVxlan::Group(
233-
Ipv4Addr::from_str("8.8.8.8").unwrap().into(),
233+
Ipv4Addr::from_str("8.8.8.8").unwrap(),
234234
),
235235
InfoVxlan::Link(13),
236236
InfoVxlan::Local(
237-
Ipv4Addr::from_str("1.1.1.1").unwrap().into(),
237+
Ipv4Addr::from_str("1.1.1.1").unwrap(),
238238
),
239239
InfoVxlan::Ttl(0),
240240
InfoVxlan::TtlInherit(false),
@@ -464,11 +464,11 @@ fn test_parsing_link_vxlan_ipv6() {
464464
LinkInfo::Data(InfoData::Vxlan(vec![
465465
InfoVxlan::Id(12),
466466
InfoVxlan::Group6(
467-
Ipv6Addr::from_str("ff00::1").unwrap().into(),
467+
Ipv6Addr::from_str("ff00::1").unwrap(),
468468
),
469469
InfoVxlan::Link(2),
470470
InfoVxlan::Local6(
471-
Ipv6Addr::from_str("fd01::2").unwrap().into(),
471+
Ipv6Addr::from_str("fd01::2").unwrap(),
472472
),
473473
InfoVxlan::Ttl(0),
474474
InfoVxlan::TtlInherit(false),

0 commit comments

Comments
 (0)