mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
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:
parent
1c5e2557e2
commit
22eac1abfc
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue