Skip to content

Commit 8ea8cd8

Browse files
committed
Fix: Specify Err variant in doc
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 parent 2d00b76 commit 8ea8cd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Simple example for interacting via ftp:
3737
use rexpect::spawn;
3838
use rexpect::error::*;
3939

40-
fn do_ftp() -> Result<()> {
40+
fn do_ftp() -> Result<(), Error> {
4141
let mut p = spawn("ftp speedtest.tele2.net", Some(30_000))?;
4242
p.exp_regex("Name \\(.*\\):")?;
4343
p.send_line("anonymous")?;
@@ -64,7 +64,7 @@ fn main() {
6464
use rexpect::spawn_bash;
6565
use rexpect::error::*;
6666

67-
fn do_bash() -> Result<()> {
67+
fn do_bash() -> Result<(), Error> {
6868
let mut p = spawn_bash(Some(2000))?;
6969

7070
// case 1: wait until program is done
@@ -114,7 +114,7 @@ goes into nirvana. There are two functions to ensure that:
114114
use rexpect::spawn_bash;
115115
use rexpect::error::*;
116116

117-
fn do_bash_jobcontrol() -> Result<()> {
117+
fn do_bash_jobcontrol() -> Result<(), Error> {
118118
let mut p = spawn_bash(Some(1000))?;
119119
p.execute("ping 8.8.8.8", "bytes of data")?;
120120
p.send_control('z')?;

0 commit comments

Comments
 (0)