@@ -108,14 +108,10 @@ where
108
108
109
109
/// Wrapper to allow fallible `v2::InputPin` traits to be converted to `v1::InputPin` traits
110
110
/// where errors will panic.
111
- ///
112
- /// Available behind `"unproven"` feature because `v1::InputPin` is
113
- #[ cfg( feature = "unproven" ) ]
114
111
pub struct OldInputPin < T > {
115
112
pin : T ,
116
113
}
117
114
118
- #[ cfg( feature = "unproven" ) ]
119
115
impl < T , E > OldInputPin < T >
120
116
where
121
117
T : v2:: OutputPin < Error =E > ,
@@ -128,7 +124,6 @@ where
128
124
129
125
}
130
126
131
- #[ cfg( feature = "unproven" ) ]
132
127
impl < T , E > From < T > for OldInputPin < T >
133
128
where
134
129
T : v2:: InputPin < Error =E > ,
@@ -141,9 +136,6 @@ where
141
136
142
137
/// Implementation of `v1::InputPin` trait for `v2::InputPin` fallible pins
143
138
/// where errors will panic.
144
- ///
145
- /// Available behind `"unproven"` feature because `v1::InputPin` is
146
- #[ cfg( feature = "unproven" ) ]
147
139
#[ allow( deprecated) ]
148
140
impl < T , E > v1:: InputPin for OldInputPin < T >
149
141
where
@@ -228,15 +220,12 @@ mod tests {
228
220
o. set_high ( ) ;
229
221
}
230
222
231
- #[ cfg( feature = "unproven" ) ]
232
223
use crate :: digital:: v1:: InputPin ;
233
224
234
- #[ cfg( feature = "unproven" ) ]
235
225
struct NewInputPinImpl {
236
226
state : Result < bool , ( ) > ,
237
227
}
238
228
239
- #[ cfg( feature = "unproven" ) ]
240
229
impl v2:: InputPin for NewInputPinImpl {
241
230
type Error = ( ) ;
242
231
@@ -248,13 +237,11 @@ mod tests {
248
237
}
249
238
}
250
239
251
- #[ cfg( feature = "unproven" ) ]
252
240
#[ allow( deprecated) ]
253
241
struct OldInputPinConsumer < T : v1:: InputPin > {
254
242
_pin : T ,
255
243
}
256
244
257
- #[ cfg( feature = "unproven" ) ]
258
245
#[ allow( deprecated) ]
259
246
impl < T > OldInputPinConsumer < T >
260
247
where T : v1:: InputPin
@@ -264,14 +251,12 @@ mod tests {
264
251
}
265
252
}
266
253
267
- #[ cfg( feature = "unproven" ) ]
268
254
#[ test]
269
255
fn v1_v2_input_explicit ( ) {
270
256
let i = NewInputPinImpl { state : Ok ( false ) } ;
271
257
let _c: OldInputPinConsumer < OldInputPin < _ > > = OldInputPinConsumer :: new ( i. into ( ) ) ;
272
258
}
273
259
274
- #[ cfg( feature = "unproven" ) ]
275
260
#[ test]
276
261
fn v1_v2_input_state ( ) {
277
262
let i: OldInputPin < _ > = NewInputPinImpl { state : Ok ( false ) } . into ( ) ;
@@ -280,7 +265,6 @@ mod tests {
280
265
assert_eq ! ( i. is_high( ) , false ) ;
281
266
}
282
267
283
- #[ cfg( feature = "unproven" ) ]
284
268
#[ test]
285
269
#[ should_panic]
286
270
fn v1_v2_input_panic ( ) {
0 commit comments