File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ pub trait Readable: Copy + Default + private::Sealed {
58
58
#[ deprecated = "replaced by `RestrictAccess<ReadOnly>::Restricted`" ]
59
59
type RestrictShared : Readable + Access ;
60
60
}
61
+ impl < A : RestrictAccess < ReadOnly , Restricted = ReadOnly > > Readable for A {
62
+ type RestrictShared = ReadOnly ;
63
+ }
61
64
62
65
/// Helper trait that is implemented by [`ReadWrite`] and [`WriteOnly`].
63
66
pub trait Writable : Access + private:: Sealed { }
@@ -78,16 +81,10 @@ where
78
81
/// Zero-sized marker type for allowing both read and write access.
79
82
#[ derive( Debug , Default , Copy , Clone ) ]
80
83
pub struct ReadWrite ;
81
- impl Readable for ReadWrite {
82
- type RestrictShared = ReadOnly ;
83
- }
84
84
85
85
/// Zero-sized marker type for allowing only read access.
86
86
#[ derive( Debug , Default , Copy , Clone ) ]
87
87
pub struct ReadOnly ;
88
- impl Readable for ReadOnly {
89
- type RestrictShared = ReadOnly ;
90
- }
91
88
92
89
/// Zero-sized marker type for allowing only write access.
93
90
#[ derive( Debug , Default , Copy , Clone ) ]
You can’t perform that action at this time.
0 commit comments