summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbold <bold@cryptoguru.com>2020-01-09 11:38:56 +0100
committerWez Furlong <wez@wezfurlong.org>2020-01-11 12:02:32 -0800
commit9a54fe97cb7f8b3c781f42f15b87060655ccce45 (patch)
treecb8827d3781d859822ee85573bd4720abf88ce13 /src
parent4c84b267b83726021935f1ba17ec1e5383a3242a (diff)
downloadssh2-rs-9a54fe97cb7f8b3c781f42f15b87060655ccce45.zip
let compiler figure out the correct type
Diffstat (limited to 'src')
-rw-r--r--src/sftp.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sftp.rs b/src/sftp.rs
index 83c77ad..e899cf7 100644
--- a/src/sftp.rs
+++ b/src/sftp.rs
@@ -491,7 +491,7 @@ impl<'sftp> Write for File<'sftp> {
raw::libssh2_sftp_write(self.raw, buf.as_ptr() as *const _, buf.len() as size_t)
};
if rc < 0 {
- Err(Error::from_errno(rc as i32).into())
+ Err(Error::from_errno(rc as _).into())
} else {
Ok(rc as usize)
}