File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ impl ::std::error::Error for Error {
25
25
}
26
26
}
27
27
28
- fn cause ( & self ) -> Option < & :: std:: error:: Error > {
28
+ fn cause ( & self ) -> Option < & dyn std:: error:: Error > {
29
29
match * self {
30
30
Error :: Io ( ref e) => Some ( e) ,
31
31
_ => None ,
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ impl Pin {
189
189
path. as_ref ( )
190
190
. file_name ( )
191
191
. and_then ( |filename| filename. to_str ( ) )
192
- . and_then ( |filename_str| filename_str. trim_left_matches ( "gpio" ) . parse :: < u64 > ( ) . ok ( ) )
192
+ . and_then ( |filename_str| filename_str. trim_start_matches ( "gpio" ) . parse :: < u64 > ( ) . ok ( ) )
193
193
. ok_or ( Error :: InvalidPath ( format ! ( "{:?}" , path. as_ref( ) ) ) )
194
194
}
195
195
@@ -223,7 +223,7 @@ impl Pin {
223
223
self . export ( ) ?;
224
224
match closure ( ) {
225
225
Ok ( ( ) ) => {
226
- try! ( self . unexport ( ) ) ;
226
+ self . unexport ( ) ? ;
227
227
Ok ( ( ) )
228
228
}
229
229
Err ( err) => {
@@ -571,7 +571,7 @@ impl PinPoller {
571
571
}
572
572
573
573
#[ cfg( not( any( target_os = "linux" , target_os = "android" ) ) ) ]
574
- pub fn new ( pin_num : u64 ) -> Result < PinPoller > {
574
+ pub fn new ( _pin_num : u64 ) -> Result < PinPoller > {
575
575
Err ( Error :: Unsupported ( "PinPoller" . into ( ) ) )
576
576
}
577
577
@@ -605,7 +605,7 @@ impl PinPoller {
605
605
}
606
606
607
607
#[ cfg( not( any( target_os = "linux" , target_os = "android" ) ) ) ]
608
- pub fn poll ( & mut self , timeout_ms : isize ) -> Result < Option < u8 > > {
608
+ pub fn poll ( & mut self , _timeout_ms : isize ) -> Result < Option < u8 > > {
609
609
Err ( Error :: Unsupported ( "PinPoller" . into ( ) ) )
610
610
}
611
611
}
You can’t perform that action at this time.
0 commit comments