File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,12 @@ enum Operation {
8989
9090impl Write for Stderr {
9191 fn poll_write (
92- mut self : Pin < & mut Self > ,
92+ self : Pin < & mut Self > ,
9393 cx : & mut Context < ' _ > ,
9494 buf : & [ u8 ] ,
9595 ) -> Poll < io:: Result < usize > > {
96- let state = & mut * self . 0 . lock ( ) . unwrap ( ) ;
96+ let mut state_guard = self . 0 . lock ( ) . unwrap ( ) ;
97+ let state = & mut * state_guard;
9798
9899 loop {
99100 match state {
@@ -137,8 +138,9 @@ impl Write for Stderr {
137138 }
138139 }
139140
140- fn poll_flush ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
141- let state = & mut * self . 0 . lock ( ) . unwrap ( ) ;
141+ fn poll_flush ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
142+ let mut state_guard = self . 0 . lock ( ) . unwrap ( ) ;
143+ let state = & mut * state_guard;
142144
143145 loop {
144146 match state {
Original file line number Diff line number Diff line change @@ -149,11 +149,12 @@ impl Stdin {
149149
150150impl Read for Stdin {
151151 fn poll_read (
152- mut self : Pin < & mut Self > ,
152+ self : Pin < & mut Self > ,
153153 cx : & mut Context < ' _ > ,
154154 buf : & mut [ u8 ] ,
155155 ) -> Poll < io:: Result < usize > > {
156- let state = & mut * self . 0 . lock ( ) . unwrap ( ) ;
156+ let mut state_guard = self . 0 . lock ( ) . unwrap ( ) ;
157+ let state = & mut * state_guard;
157158
158159 loop {
159160 match state {
Original file line number Diff line number Diff line change @@ -89,11 +89,12 @@ enum Operation {
8989
9090impl Write for Stdout {
9191 fn poll_write (
92- mut self : Pin < & mut Self > ,
92+ self : Pin < & mut Self > ,
9393 cx : & mut Context < ' _ > ,
9494 buf : & [ u8 ] ,
9595 ) -> Poll < io:: Result < usize > > {
96- let state = & mut * self . 0 . lock ( ) . unwrap ( ) ;
96+ let mut state_guard = self . 0 . lock ( ) . unwrap ( ) ;
97+ let state = & mut * state_guard;
9798
9899 loop {
99100 match state {
@@ -137,8 +138,9 @@ impl Write for Stdout {
137138 }
138139 }
139140
140- fn poll_flush ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
141- let state = & mut * self . 0 . lock ( ) . unwrap ( ) ;
141+ fn poll_flush ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
142+ let mut state_guard = self . 0 . lock ( ) . unwrap ( ) ;
143+ let state = & mut * state_guard;
142144
143145 loop {
144146 match state {
You can’t perform that action at this time.
0 commit comments