From 485f29cccc747087237bfd709bc6fbf94d06dd22 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 16 Aug 2024 21:23:22 +0100 Subject: [PATCH] Make Address:v6() constructor const --- src/wire/ip.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/wire/ip.rs b/src/wire/ip.rs index b782d84e0..1d1c63d64 100644 --- a/src/wire/ip.rs +++ b/src/wire/ip.rs @@ -104,7 +104,16 @@ impl Address { /// Create an address wrapping an IPv6 address with the given octets. #[cfg(feature = "proto-ipv6")] #[allow(clippy::too_many_arguments)] - pub fn v6(a0: u16, a1: u16, a2: u16, a3: u16, a4: u16, a5: u16, a6: u16, a7: u16) -> Address { + pub const fn v6( + a0: u16, + a1: u16, + a2: u16, + a3: u16, + a4: u16, + a5: u16, + a6: u16, + a7: u16, + ) -> Address { Address::Ipv6(Ipv6Address::new(a0, a1, a2, a3, a4, a5, a6, a7)) }