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 {
2525 }
2626 }
2727
28- fn cause ( & self ) -> Option < & :: std:: error:: Error > {
28+ fn cause ( & self ) -> Option < & dyn std:: error:: Error > {
2929 match * self {
3030 Error :: Io ( ref e) => Some ( e) ,
3131 _ => None ,
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ impl Pin {
189189 path. as_ref ( )
190190 . file_name ( )
191191 . 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 ( ) )
193193 . ok_or ( Error :: InvalidPath ( format ! ( "{:?}" , path. as_ref( ) ) ) )
194194 }
195195
@@ -223,7 +223,7 @@ impl Pin {
223223 self . export ( ) ?;
224224 match closure ( ) {
225225 Ok ( ( ) ) => {
226- try! ( self . unexport ( ) ) ;
226+ self . unexport ( ) ? ;
227227 Ok ( ( ) )
228228 }
229229 Err ( err) => {
@@ -571,7 +571,7 @@ impl PinPoller {
571571 }
572572
573573 #[ 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 > {
575575 Err ( Error :: Unsupported ( "PinPoller" . into ( ) ) )
576576 }
577577
@@ -605,7 +605,7 @@ impl PinPoller {
605605 }
606606
607607 #[ 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 > > {
609609 Err ( Error :: Unsupported ( "PinPoller" . into ( ) ) )
610610 }
611611}
You can’t perform that action at this time.
0 commit comments