summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/channel.rs2
-rw-r--r--src/knownhosts.rs6
-rw-r--r--tests/all.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/channel.rs b/src/channel.rs
index 3301610..45249d0 100644
--- a/src/channel.rs
+++ b/src/channel.rs
@@ -164,7 +164,7 @@ impl<'a> Channel<'a> {
///
/// ```no_run
/// # use ssh2::Session;
- /// # let session: Session = fail!();
+ /// # let session: Session = panic!();
/// let mut channel = session.channel_session().unwrap();
/// channel.exec("ls").unwrap();
/// println!("{}", channel.read_to_string().unwrap());
diff --git a/src/knownhosts.rs b/src/knownhosts.rs
index ddb54fd..12f562b 100644
--- a/src/knownhosts.rs
+++ b/src/knownhosts.rs
@@ -27,9 +27,9 @@ use {raw, Session, Error, KnownHostFileKind, CheckResult};
/// ssh2::CheckMatch => return, // all good!
/// ssh2::CheckNotFound => {} // ok, we'll add it
/// ssh2::CheckMismatch => {
-/// fail!("host mismatch, man in the middle attack?!")
+/// panic!("host mismatch, man in the middle attack?!")
/// }
-/// ssh2::CheckFailure => fail!("failed to check the known hosts"),
+/// ssh2::CheckFailure => panic!("failed to check the known hosts"),
/// }
///
/// println!("adding {} to the known hosts", host);
@@ -37,7 +37,7 @@ use {raw, Session, Error, KnownHostFileKind, CheckResult};
/// known_hosts.add(host, key, host, match key_type {
/// ssh2::TypeRsa => ssh2::KeySshRsa,
/// ssh2::TypeDss => ssh2::KeySshDss,
-/// ssh2::TypeUnknown => fail!("unknown type of key!"),
+/// ssh2::TypeUnknown => panic!("unknown type of key!"),
/// }).unwrap();
/// known_hosts.write_file(&file, ssh2::OpenSSH).unwrap();
/// }
diff --git a/tests/all.rs b/tests/all.rs
index 5bb7257..cec7985 100644
--- a/tests/all.rs
+++ b/tests/all.rs
@@ -19,7 +19,7 @@ pub fn socket() -> TcpStream {
}, None);
match stream {
Ok(s) => s,
- Err(e) => fail!("no socket: [{}]: {}", e.code, e.detail),
+ Err(e) => panic!("no socket: [{}]: {}", e.code, e.detail),
}
}