File tree 3 files changed +15
-10
lines changed
3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -89,11 +89,12 @@ enum Operation {
89
89
90
90
impl Write for Stderr {
91
91
fn poll_write (
92
- mut self : Pin < & mut Self > ,
92
+ self : Pin < & mut Self > ,
93
93
cx : & mut Context < ' _ > ,
94
94
buf : & [ u8 ] ,
95
95
) -> 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;
97
98
98
99
loop {
99
100
match state {
@@ -137,8 +138,9 @@ impl Write for Stderr {
137
138
}
138
139
}
139
140
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;
142
144
143
145
loop {
144
146
match state {
Original file line number Diff line number Diff line change @@ -149,11 +149,12 @@ impl Stdin {
149
149
150
150
impl Read for Stdin {
151
151
fn poll_read (
152
- mut self : Pin < & mut Self > ,
152
+ self : Pin < & mut Self > ,
153
153
cx : & mut Context < ' _ > ,
154
154
buf : & mut [ u8 ] ,
155
155
) -> 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;
157
158
158
159
loop {
159
160
match state {
Original file line number Diff line number Diff line change @@ -89,11 +89,12 @@ enum Operation {
89
89
90
90
impl Write for Stdout {
91
91
fn poll_write (
92
- mut self : Pin < & mut Self > ,
92
+ self : Pin < & mut Self > ,
93
93
cx : & mut Context < ' _ > ,
94
94
buf : & [ u8 ] ,
95
95
) -> 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;
97
98
98
99
loop {
99
100
match state {
@@ -137,8 +138,9 @@ impl Write for Stdout {
137
138
}
138
139
}
139
140
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;
142
144
143
145
loop {
144
146
match state {
You can’t perform that action at this time.
0 commit comments