async fn flush(evented_fd: &mut fasync::net::EventedFd<File>) -> Result<(), Error> {
        loop {
            let mut output = [0u8, 16];
            let _ = evented_fd.read(&mut output).await?;
            // Look for a space to signal we have reached the end.
            if output.contains(&32) {
                break;
            }
        }

        Ok(())
    }
// Helper utility to flush out the pty. This method is useful for asserting on what is returned
// from the pty without having to worry about what is sitting in the read queue.
//
// This method will read from the pty until it finds a single space. We use this as an
// indicator that the pty is waiting for input.
Helper utility to flush out the pty. This method is useful for asserting on what is returned
from the pty without having to worry about what is sitting in the read queue.

This method will read from the pty until it finds a single space. We use this as an
indicator that the pty is waiting for input.
Helper utility to flush out the pty . This method is useful for asserting on what is returned from the pty without having to worry about what is sitting in the read queue . This method will read from the pty until it finds a single space . We use this as an indicator that the pty is waiting for input .
async fn flush(evented_fd: &mut fasync::net::EventedFd<File>) -> Result<(), Error> {
        loop {
            let mut output = [0u8, 16];
            let _ = evented_fd.read(&mut output).await?;
            // Look for a space to signal we have reached the end.
            if output.contains(&32) {
                break;
            }
        }
        Ok(())
    }
async fn flush ( evented_fd : & mut fasync :: net :: EventedFd < File > ) -> Result < ( ) , Error > { loop { let mut output = [ 0u8 , 16 ] ; let _ = evented_fd . read ( & mut output ) . await ? ; // Look for a space to signal we have reached the end. if output . contains ( & 32 ) { break ; } } Ok ( ( ) ) }
Helper utility to flush out the pty.
Helper utility to flush out the pty .
evented_fd
&mut fasync::net::EventedFd<File>
evented_fd
&mut fasync::net::EventedFd<File>