Skip to content

Commit fc99347

Browse files
committed
derive Default
1 parent 481ab99 commit fc99347

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use core::ptr;
3434
/// take and return copies of the value.
3535
///
3636
/// The size of this struct is the same as the size of the contained type.
37-
#[derive(Debug)]
37+
#[derive(Debug, Default)]
3838
#[repr(transparent)]
3939
pub struct Volatile<T: Copy>(T);
4040

@@ -151,7 +151,7 @@ impl<T: Copy> Clone for Volatile<T> {
151151
/// A volatile wrapper which only allows read operations.
152152
///
153153
/// The size of this struct is the same as the contained type.
154-
#[derive(Debug, Clone)]
154+
#[derive(Debug, Clone, Default)]
155155
pub struct ReadOnly<T: Copy>(Volatile<T>);
156156

157157
impl<T: Copy> ReadOnly<T> {
@@ -208,7 +208,7 @@ impl<T: Copy> ReadOnly<T> {
208208
/// A volatile wrapper which only allows write operations.
209209
///
210210
/// The size of this struct is the same as the contained type.
211-
#[derive(Debug, Clone)]
211+
#[derive(Debug, Clone, Default)]
212212
pub struct WriteOnly<T: Copy>(Volatile<T>);
213213

214214
impl<T: Copy> WriteOnly<T> {

0 commit comments

Comments
 (0)