From 13c4b2e2d2031b7738adb76734aa6ef8fe6c8e35 Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Sun, 15 Dec 2024 18:32:23 -0500 Subject: [PATCH 1/2] Remove a pointless allocation The stack size is 152 bytes which is teeny. --- wayland-backend/src/rs/socket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wayland-backend/src/rs/socket.rs b/wayland-backend/src/rs/socket.rs index 94170d233ae..4d6b286fece 100644 --- a/wayland-backend/src/rs/socket.rs +++ b/wayland-backend/src/rs/socket.rs @@ -75,7 +75,7 @@ impl Socket { #[cfg(target_os = "macos")] let flags = RecvFlags::DONTWAIT; - let mut cmsg_space = vec![0; rustix::cmsg_space!(ScmRights(MAX_FDS_OUT))]; + let mut cmsg_space = [0; rustix::cmsg_space!(ScmRights(MAX_FDS_OUT))]; let mut cmsg_buffer = RecvAncillaryBuffer::new(&mut cmsg_space); let mut iov = [IoSliceMut::new(buffer)]; let msg = retry_on_intr(|| recvmsg(&self.stream, &mut iov[..], &mut cmsg_buffer, flags))?; From b3cb67b20125e8ac1d8aa1db0a16945ae93a0003 Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Wed, 18 Dec 2024 20:48:45 -0800 Subject: [PATCH 2/2] Update rustix --- wayland-backend/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wayland-backend/Cargo.toml b/wayland-backend/Cargo.toml index ca4d682f34c..55c74f935c1 100644 --- a/wayland-backend/Cargo.toml +++ b/wayland-backend/Cargo.toml @@ -31,7 +31,7 @@ features = [ ] [dependencies.rustix] -version = "0.38.17" +version = "0.38.42" features = [ "event", "fs",