From e3cf2b2b48c1aa889a30213945c78159bee213ef Mon Sep 17 00:00:00 2001 From: Thomas Winwood Date: Fri, 22 Dec 2017 04:52:09 +0000 Subject: [PATCH] Add Copy derives --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7394c0e..4454143 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,7 +34,7 @@ use core::ptr; /// take and return copies of the value. /// /// The size of this struct is the same as the size of the contained type. -#[derive(Debug)] +#[derive(Clone, Copy, Debug)] pub struct Volatile(T); impl Volatile { @@ -143,7 +143,7 @@ impl Volatile { /// A volatile wrapper which only allows read operations. /// /// The size of this struct is the same as the contained type. -#[derive(Debug)] +#[derive(Clone, Copy, Debug)] pub struct ReadOnly(Volatile); impl ReadOnly { @@ -200,7 +200,7 @@ impl ReadOnly { /// A volatile wrapper which only allows write operations. /// /// The size of this struct is the same as the contained type. -#[derive(Debug)] +#[derive(Clone, Copy, Debug)] pub struct WriteOnly(Volatile); impl WriteOnly {