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>
This commit is contained in:
David Tolnay 2019-04-15 15:35:28 -07:00 committed by chrome-bot
parent 1c5e2557e2
commit 22eac1abfc

View file

@ -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();