|
|
@ -89,11 +89,12 @@ enum Operation {
|
|
|
|
|
|
|
|
|
|
|
|
impl Write for Stderr {
|
|
|
|
impl Write for Stderr {
|
|
|
|
fn poll_write(
|
|
|
|
fn poll_write(
|
|
|
|
mut self: Pin<&mut Self>,
|
|
|
|
self: Pin<&mut Self>,
|
|
|
|
cx: &mut Context<'_>,
|
|
|
|
cx: &mut Context<'_>,
|
|
|
|
buf: &[u8],
|
|
|
|
buf: &[u8],
|
|
|
|
) -> Poll<io::Result<usize>> {
|
|
|
|
) -> Poll<io::Result<usize>> {
|
|
|
|
let state = &mut *self.0.lock().unwrap();
|
|
|
|
let mut state_guard = self.0.lock().unwrap();
|
|
|
|
|
|
|
|
let state = &mut *state_guard;
|
|
|
|
|
|
|
|
|
|
|
|
loop {
|
|
|
|
loop {
|
|
|
|
match state {
|
|
|
|
match state {
|
|
|
@ -137,8 +138,9 @@ impl Write for Stderr {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
|
|
|
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
|
|
|
let state = &mut *self.0.lock().unwrap();
|
|
|
|
let mut state_guard = self.0.lock().unwrap();
|
|
|
|
|
|
|
|
let state = &mut *state_guard;
|
|
|
|
|
|
|
|
|
|
|
|
loop {
|
|
|
|
loop {
|
|
|
|
match state {
|
|
|
|
match state {
|
|
|
|