From 06930d27ce8e292755754b1e09901fb36cd46919 Mon Sep 17 00:00:00 2001 From: bluss Date: Sat, 22 Dec 2018 19:59:32 +0100 Subject: [PATCH] FIX: Remove unused Copy/Clone for MaybeUninit --- src/maybe_uninit.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/maybe_uninit.rs b/src/maybe_uninit.rs index 39c6366..9ed1f6a 100644 --- a/src/maybe_uninit.rs +++ b/src/maybe_uninit.rs @@ -6,7 +6,6 @@ use std::mem::ManuallyDrop; /// A combination of ManuallyDrop and “maybe uninitialized”; /// this wraps a value that can be wholly or partially uninitialized; /// it also has no drop regardless of the type of T. -#[derive(Copy)] #[repr(C)] // for cast from self ptr to value pub union MaybeUninit { empty: (), @@ -14,11 +13,6 @@ pub union MaybeUninit { } // Why we don't use std's MaybeUninit on nightly? See the ptr method -impl Clone for MaybeUninit where T: Copy -{ - fn clone(&self) -> Self { *self } -} - impl MaybeUninit { /// Create a new MaybeUninit with uninitialized interior pub unsafe fn uninitialized() -> Self {