diff options
author | Alex Crichton <alex@alexcrichton.com> | 2014-12-02 18:17:43 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2014-12-02 18:17:43 -0800 |
commit | 490f91fb9e90bf4e305f1a23a051228c59e60eaf (patch) | |
tree | a29fe968899875097e88c55012b85ab8f0d221fd /src | |
parent | d4b443946021ee6f29129665e80b3f45d6f5aeee (diff) | |
download | ssh2-rs-490f91fb9e90bf4e305f1a23a051228c59e60eaf.zip |
Update tests
Diffstat (limited to 'src')
-rw-r--r-- | src/knownhosts.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/knownhosts.rs b/src/knownhosts.rs index fe1acdd..0aa8427 100644 --- a/src/knownhosts.rs +++ b/src/knownhosts.rs @@ -12,13 +12,14 @@ use {raw, Session, Error, KnownHostFileKind, CheckResult}; /// ```no_run /// use std::os; /// use ssh2::{mod, CheckResult, HostKeyType, KnownHostKeyFormat}; +/// use ssh2::KnownHostFileKind; /// /// fn check_known_host(session: &ssh2::Session, host: &str) { /// let mut known_hosts = session.known_hosts().unwrap(); /// /// // Initialize the known hosts with a global known hosts file /// let file = Path::new(os::getenv("HOME").unwrap()).join(".ssh/known_hosts"); -/// known_hosts.read_file(&file, ssh2::OpenSSH).unwrap(); +/// known_hosts.read_file(&file, KnownHostFileKind::OpenSSH).unwrap(); /// /// // Now check to see if the seesion's host key is anywhere in the known /// // hosts file @@ -39,7 +40,7 @@ use {raw, Session, Error, KnownHostFileKind, CheckResult}; /// HostKeyType::Dss => KnownHostKeyFormat::SshDss, /// HostKeyType::Unknown => panic!("unknown type of key!"), /// }).unwrap(); -/// known_hosts.write_file(&file, ssh2::OpenSSH).unwrap(); +/// known_hosts.write_file(&file, KnownHostFileKind::OpenSSH).unwrap(); /// } /// ``` pub struct KnownHosts<'a> { |