summary refs log tree commit diff
path: root/msg_socket
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@chromium.org>2019-04-15 15:35:28 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-17 17:22:57 -0700
commit22eac1abfc216c92bc704a0a7629714104c162e4 (patch)
tree3c3dcd50ae8c7564fd891e686c2cd1a4054108bf /msg_socket
parent1c5e2557e2eb3992c320b658ef117cb578bc6fe1 (diff)
downloadcrosvm-22eac1abfc216c92bc704a0a7629714104c162e4.tar
crosvm-22eac1abfc216c92bc704a0a7629714104c162e4.tar.gz
crosvm-22eac1abfc216c92bc704a0a7629714104c162e4.tar.bz2
crosvm-22eac1abfc216c92bc704a0a7629714104c162e4.tar.lz
crosvm-22eac1abfc216c92bc704a0a7629714104c162e4.tar.xz
crosvm-22eac1abfc216c92bc704a0a7629714104c162e4.tar.zst
crosvm-22eac1abfc216c92bc704a0a7629714104c162e4.zip
msg_socket: Remove redundant supertrait bound
We have:

    unsafe trait AlignedNew: Sized + DataInit {...}

    unsafe trait DataInit: Copy + Send + Sync {...}

    trait Copy: Clone {...}

    trait Clone: Sized {...}

Since Sized is already indirectly a supertrait of DataInit, including it
again as a supertrait of AlignedNew has no effect. This CL removes the
redundant Sized bound.

TEST=cargo check

Change-Id: I8ee2a9ee8892c95e6b0dd4bac1b662cd97441984
Reviewed-on: https://chromium-review.googlesource.com/1568077
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'msg_socket')
-rw-r--r--msg_socket/src/msg_on_socket.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/msg_socket/src/msg_on_socket.rs b/msg_socket/src/msg_on_socket.rs
index 98976e8..635820d 100644
--- a/msg_socket/src/msg_on_socket.rs
+++ b/msg_socket/src/msg_on_socket.rs
@@ -209,7 +209,7 @@ rawfd_impl!(UnixDatagram);
 
 // This trait is unsafe as it use uninitialized memory.
 // Please only implement it for primitive types.
-unsafe trait AlignedNew: Sized + DataInit {
+unsafe trait AlignedNew: DataInit {
     unsafe fn from_unaligned(buffer: &[u8]) -> Option<Self> {
         let mut value = std::mem::uninitialized::<Self>();
         let value_mem = value.as_mut_slice();