File tree 1 file changed +1
-2
lines changed
1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ pub trait Readable: Copy + Default + private::Sealed {
61
61
62
62
/// Helper trait that is implemented by [`ReadWrite`] and [`WriteOnly`].
63
63
pub trait Writable : Access + private:: Sealed { }
64
+ impl < A : RestrictAccess < WriteOnly , Restricted = WriteOnly > > Writable for A { }
64
65
65
66
/// Implemented for access types that permit copying of `VolatileRef`.
66
67
pub trait Copyable : private:: Sealed { }
@@ -80,7 +81,6 @@ pub struct ReadWrite;
80
81
impl Readable for ReadWrite {
81
82
type RestrictShared = ReadOnly ;
82
83
}
83
- impl Writable for ReadWrite { }
84
84
85
85
/// Zero-sized marker type for allowing only read access.
86
86
#[ derive( Debug , Default , Copy , Clone ) ]
@@ -95,7 +95,6 @@ pub struct WriteOnly;
95
95
impl Access for WriteOnly {
96
96
type RestrictShared = NoAccess ;
97
97
}
98
- impl Writable for WriteOnly { }
99
98
100
99
/// Zero-sized marker type that grants no access.
101
100
#[ derive( Debug , Default , Copy , Clone ) ]
You can’t perform that action at this time.
0 commit comments