summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-10-30 08:35:20 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-10-30 08:35:20 -0700
commit510d4f238a71a758d3c14be1717baec92ab147e5 (patch)
treeb3d66fabf8b01d7d7550e5a261f3ef780b42411b /src
parentefbfeed3d2d72c0b10e35882ea6d7b7004cceb7d (diff)
downloadssh2-rs-510d4f238a71a758d3c14be1717baec92ab147e5.zip
fail => panic
Diffstat (limited to 'src')
-rw-r--r--src/channel.rs2
-rw-r--r--src/knownhosts.rs6
2 files changed, 4 insertions, 4 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();
/// }