Skip to content

Commit dcbe31e

Browse files
committed
Fix doc examples: Import correct error type
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 parent 177c66d commit dcbe31e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/session.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ impl<W: Write> StreamSession<W> {
134134
///
135135
/// ```
136136
/// use rexpect::{spawn, ReadUntil};
137-
/// # use rexpect::errors::*;
137+
/// # use rexpect::error::Error;
138138
///
139139
/// # fn main() {
140-
/// # || -> Result<()> {
140+
/// # || -> Result<(), Error> {
141141
/// let mut s = spawn("cat", Some(1000))?;
142142
/// s.send_line("hello, polly!")?;
143143
/// s.exp_any(vec![ReadUntil::String("hello".into()),
@@ -178,10 +178,10 @@ impl DerefMut for PtySession {
178178
/// ```
179179
///
180180
/// use rexpect::spawn;
181-
/// # use rexpect::errors::*;
181+
/// # use rexpect::error::Error;
182182
///
183183
/// # fn main() {
184-
/// # || -> Result<()> {
184+
/// # || -> Result<(), Error> {
185185
/// let mut s = spawn("cat", Some(1000))?;
186186
/// s.send_line("hello, polly!")?;
187187
/// let line = s.read_line()?;
@@ -283,10 +283,10 @@ impl PtyReplSession {
283283
///
284284
/// ```
285285
/// use rexpect::spawn_bash;
286-
/// # use rexpect::errors::*;
286+
/// # use rexpect::error::Error;
287287
///
288288
/// # fn main() {
289-
/// # || -> Result<()> {
289+
/// # || -> Result<(), Error> {
290290
/// let mut p = spawn_bash(Some(1000))?;
291291
/// p.execute("cat <(echo ready) -", "ready")?;
292292
/// p.send_line("hans")?;

0 commit comments

Comments
 (0)