From 86acc26cbcadfd572d6af93ba34467a3cdac8b4e Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sat, 24 Jul 2021 16:47:26 -0600 Subject: Constify many functions Constify most functions that can be constified. The exceptions are mostly accessors for structs that have no const constructor. --- src/sys/socket/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sys/socket/mod.rs') diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index da5573c4..33bdbb62 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -384,7 +384,7 @@ pub struct Ipv6MembershipRequest(libc::ipv6_mreq); impl Ipv6MembershipRequest { /// Instantiate a new `Ipv6MembershipRequest` - pub fn new(group: Ipv6Addr) -> Self { + pub const fn new(group: Ipv6Addr) -> Self { Ipv6MembershipRequest(libc::ipv6_mreq { ipv6mr_multiaddr: group.0, ipv6mr_interface: 0, -- cgit v1.2.3