Skip to content

Commit 8e3ea5c

Browse files
authored
Merge pull request #975 from sciguy16/feature/ip-v6-new-const
Make Address:v6() constructor const
2 parents dc08e0b + 485f29c commit 8e3ea5c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/wire/ip.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,16 @@ impl Address {
104104
/// Create an address wrapping an IPv6 address with the given octets.
105105
#[cfg(feature = "proto-ipv6")]
106106
#[allow(clippy::too_many_arguments)]
107-
pub fn v6(a0: u16, a1: u16, a2: u16, a3: u16, a4: u16, a5: u16, a6: u16, a7: u16) -> Address {
107+
pub const fn v6(
108+
a0: u16,
109+
a1: u16,
110+
a2: u16,
111+
a3: u16,
112+
a4: u16,
113+
a5: u16,
114+
a6: u16,
115+
a7: u16,
116+
) -> Address {
108117
Address::Ipv6(Ipv6Address::new(a0, a1, a2, a3, a4, a5, a6, a7))
109118
}
110119

0 commit comments

Comments
 (0)