Skip to content

Commit cd11e47

Browse files
committed
test(nat): Remove warning for shuttle tests
We have a warning when building the shuttle tests for nat: $ cargo check --features shuttle --all-targets -p dataplane-nat [...] warning: function `vpcd1` is never used --> nat/src/masquerade/apalloc/test_alloc.rs:43:12 | 43 | pub fn vpcd1() -> VpcDiscriminant { | ^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default It's not blocking, but let's suppress it anyway. On Copilot review's suggestion, suppress "dead_code" warnings rather than "unused", that might be broader (such as unused variables or imports inside of body functions). Signed-off-by: Quentin Monnet <qmo@qmon.net>
1 parent a432a17 commit cd11e47

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎nat/src/masquerade/apalloc/test_alloc.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ mod context {
2121
use std::net::{IpAddr, Ipv4Addr};
2222
use std::str::FromStr;
2323

24-
#[allow(unused)]
24+
#[allow(dead_code)]
2525
pub fn addr_v4(ip: &str) -> Ipv4Addr {
2626
Ipv4Addr::from_str(ip).unwrap()
2727
}
28-
#[allow(unused)]
28+
#[allow(dead_code)]
2929
pub fn addr_v4_bits(ip: &str) -> u32 {
3030
addr_v4(ip).to_bits()
3131
}
32-
#[allow(unused)]
32+
#[allow(dead_code)]
3333
pub fn ipaddr(ip: &str) -> IpAddr {
3434
IpAddr::from_str(ip).unwrap()
3535
}
@@ -40,6 +40,7 @@ mod context {
4040
pub fn vni2() -> Vni {
4141
Vni::new_checked(200).unwrap()
4242
}
43+
#[allow(dead_code)]
4344
pub fn vpcd1() -> VpcDiscriminant {
4445
VpcDiscriminant::from_vni(vni1())
4546
}

0 commit comments

Comments
 (0)