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