File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ macro_rules! try_unexport {
102102 match $e {
103103 Ok ( res) => res,
104104 Err ( e) => {
105- try! ( $gpio. unexport( ) ) ;
105+ $gpio. unexport( ) ? ;
106106 return Err ( e) ;
107107 }
108108 }
@@ -217,8 +217,8 @@ impl Pin {
217217 /// let gpio = Pin::new(24);
218218 /// let res = gpio.with_exported(|| {
219219 /// println!("At this point, the Pin is exported");
220- /// try!( gpio.set_direction(Direction::Low)) ;
221- /// try!( gpio.set_value(1)) ;
220+ /// gpio.set_direction(Direction::Low)? ;
221+ /// gpio.set_value(1)? ;
222222 /// // ...
223223 /// Ok(())
224224 /// });
@@ -731,7 +731,7 @@ impl Stream for PinValueStream {
731731 fn poll ( & mut self ) -> Poll < Option < Self :: Item > , Self :: Error > {
732732 match self . 0 . poll ( ) {
733733 Ok ( Async :: Ready ( Some ( ( ) ) ) ) => {
734- let value = try! ( self . get_value ( ) ) ;
734+ let value = self . get_value ( ) ? ;
735735 Ok ( Async :: Ready ( Some ( value) ) )
736736 }
737737 Ok ( Async :: Ready ( None ) ) => Ok ( Async :: Ready ( None ) ) ,
You can’t perform that action at this time.
0 commit comments