@@ -46,21 +46,11 @@ restrict_impl!(WriteOnly, WriteOnly, WriteOnly);
46
46
restrict_impl ! ( WriteOnly , NoAccess , NoAccess ) ;
47
47
48
48
/// Sealed trait that is implemented for the types in this module.
49
- pub trait Access : Copy + Default + private:: Sealed {
50
- /// Reduced access level to safely share the corresponding value.
51
- #[ deprecated = "replaced by `RestrictAccess<ReadOnly>::Restricted`" ]
52
- type RestrictShared : Access ;
53
- }
49
+ pub trait Access : Copy + Default + private:: Sealed { }
54
50
55
51
/// Helper trait that is implemented by [`ReadWrite`] and [`ReadOnly`].
56
- pub trait Readable : Copy + Default + private:: Sealed {
57
- /// Reduced access level to safely share the corresponding value.
58
- #[ deprecated = "replaced by `RestrictAccess<ReadOnly>::Restricted`" ]
59
- type RestrictShared : Readable + Access ;
60
- }
61
- impl < A : RestrictAccess < ReadOnly , Restricted = ReadOnly > > Readable for A {
62
- type RestrictShared = <Self as RestrictAccess < ReadOnly > >:: Restricted ;
63
- }
52
+ pub trait Readable : Copy + Default + private:: Sealed { }
53
+ impl < A : RestrictAccess < ReadOnly , Restricted = ReadOnly > > Readable for A { }
64
54
65
55
/// Helper trait that is implemented by [`ReadWrite`] and [`WriteOnly`].
66
56
pub trait Writable : Access + private:: Sealed { }
@@ -73,30 +63,22 @@ impl<A: RestrictAccess<ReadOnly, Restricted = Self>> Copyable for A {}
73
63
/// Zero-sized marker type for allowing both read and write access.
74
64
#[ derive( Debug , Default , Copy , Clone ) ]
75
65
pub struct ReadWrite ;
76
- impl Access for ReadWrite {
77
- type RestrictShared = <Self as RestrictAccess < ReadOnly > >:: Restricted ;
78
- }
66
+ impl Access for ReadWrite { }
79
67
80
68
/// Zero-sized marker type for allowing only read access.
81
69
#[ derive( Debug , Default , Copy , Clone ) ]
82
70
pub struct ReadOnly ;
83
- impl Access for ReadOnly {
84
- type RestrictShared = <Self as RestrictAccess < ReadOnly > >:: Restricted ;
85
- }
71
+ impl Access for ReadOnly { }
86
72
87
73
/// Zero-sized marker type for allowing only write access.
88
74
#[ derive( Debug , Default , Copy , Clone ) ]
89
75
pub struct WriteOnly ;
90
- impl Access for WriteOnly {
91
- type RestrictShared = <Self as RestrictAccess < ReadOnly > >:: Restricted ;
92
- }
76
+ impl Access for WriteOnly { }
93
77
94
78
/// Zero-sized marker type that grants no access.
95
79
#[ derive( Debug , Default , Copy , Clone ) ]
96
80
pub struct NoAccess ;
97
- impl Access for NoAccess {
98
- type RestrictShared = <Self as RestrictAccess < ReadOnly > >:: Restricted ;
99
- }
81
+ impl Access for NoAccess { }
100
82
101
83
mod private {
102
84
pub trait Sealed { }
0 commit comments