diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-01-29 14:50:39 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-01-29 17:41:26 +0100 |
commit | 442740975e41208c1cad300bc023ddedb04fc3a6 (patch) | |
tree | 01ef5d601e9aaed94c8700620ee2ee70bf91193b /openpgp-ffi/src/serialize.rs | |
parent | 51790b4fa46b41eba4c98b14a1193ad8e55b19b3 (diff) |
openpgp-ffi: Explicitly convert to failure::Error.
Diffstat (limited to 'openpgp-ffi/src/serialize.rs')
-rw-r--r-- | openpgp-ffi/src/serialize.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp-ffi/src/serialize.rs b/openpgp-ffi/src/serialize.rs index f489ceb7..f94cb2ad 100644 --- a/openpgp-ffi/src/serialize.rs +++ b/openpgp-ffi/src/serialize.rs @@ -61,7 +61,7 @@ pub extern "system" fn pgp_writer_stack_write let buf = unsafe { slice::from_raw_parts(buf, len as usize) }; - ffi_try_or!(writer.write(buf).map_err(|e| e.into()), -1) as ssize_t + ffi_try_or!(writer.write(buf).map_err(|e| ::failure::Error::from(e)), -1) as ssize_t } /// Writes up to `len` bytes of `buf` into `writer`. @@ -82,7 +82,7 @@ pub extern "system" fn pgp_writer_stack_write_all let buf = unsafe { slice::from_raw_parts(buf, len as usize) }; - ffi_try_status!(writer.write_all(buf).map_err(|e| e.into())) + ffi_try_status!(writer.write_all(buf).map_err(|e| ::failure::Error::from(e))) } /// Finalizes this writer, returning the underlying writer. |