Skip to content

Commit 6f4463d

Browse files
committed
docs: Move doc comment onto method
1 parent 59b8286 commit 6f4463d

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

src/session.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -184,26 +184,26 @@ impl DerefMut for PtySession {
184184
}
185185
}
186186

187-
/// Start a process in a tty session, write and read from it
188-
///
189-
/// # Example
190-
///
191-
/// ```
192-
///
193-
/// use rexpect::spawn;
194-
/// # use rexpect::error::Error;
195-
///
196-
/// # fn main() {
197-
/// # || -> Result<(), Error> {
198-
/// let mut s = spawn("cat", Some(1000))?;
199-
/// s.send_line("hello, polly!")?;
200-
/// let line = s.read_line()?;
201-
/// assert_eq!("hello, polly!", line);
202-
/// # Ok(())
203-
/// # }().expect("test failed");
204-
/// # }
205-
/// ```
206187
impl PtySession {
188+
/// Start a process in a tty session, write and read from it
189+
///
190+
/// # Example
191+
///
192+
/// ```
193+
///
194+
/// use rexpect::spawn;
195+
/// # use rexpect::error::Error;
196+
///
197+
/// # fn main() {
198+
/// # || -> Result<(), Error> {
199+
/// let mut s = spawn("cat", Some(1000))?;
200+
/// s.send_line("hello, polly!")?;
201+
/// let line = s.read_line()?;
202+
/// assert_eq!("hello, polly!", line);
203+
/// # Ok(())
204+
/// # }().expect("test failed");
205+
/// # }
206+
/// ```
207207
fn new(process: PtyProcess, options: Options) -> Result<Self, Error> {
208208
let f = process.get_file_handle()?;
209209
let reader = f.try_clone()?;

0 commit comments

Comments
 (0)