Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,24 +172,6 @@ impl DerefMut for PtySession {
}

/// Start a process in a tty session, write and read from it
///
/// # Example
///
/// ```
///
/// use rexpect::spawn;
/// # use rexpect::error::Error;
///
/// # fn main() {
/// # || -> Result<(), Error> {
/// let mut s = spawn("cat", Some(1000))?;
/// s.send_line("hello, polly!")?;
/// let line = s.read_line()?;
/// assert_eq!("hello, polly!", line);
/// # Ok(())
/// # }().expect("test failed");
/// # }
/// ```
impl PtySession {
fn new(process: PtyProcess, timeout_ms: Option<u64>) -> Result<Self, Error> {
let f = process.get_file_handle()?;
Expand Down