aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/util.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-30 16:37:45 -0700
committerSteven Fackler <[email protected]>2016-10-30 16:37:45 -0700
commitf75f82e466993848393c7a26ccb51dc31b4547fe (patch)
tree3b859d04e3216052fa5ff3c4c753ce204a3c9703 /openssl/src/util.rs
parentRemove out of date comment (diff)
downloadrust-openssl-f75f82e466993848393c7a26ccb51dc31b4547fe.tar.xz
rust-openssl-f75f82e466993848393c7a26ccb51dc31b4547fe.zip
Rustfmt
Diffstat (limited to 'openssl/src/util.rs')
-rw-r--r--openssl/src/util.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/openssl/src/util.rs b/openssl/src/util.rs
index 68d9b32a..49f38c3d 100644
--- a/openssl/src/util.rs
+++ b/openssl/src/util.rs
@@ -36,12 +36,13 @@ impl<F> Drop for CallbackState<F> {
/// Password callback function, passed to private key loading functions.
///
/// `cb_state` is expected to be a pointer to a `CallbackState`.
-pub unsafe extern fn invoke_passwd_cb<F>(buf: *mut c_char,
- size: c_int,
- _rwflag: c_int,
- cb_state: *mut c_void)
- -> c_int
- where F: FnOnce(&mut [c_char]) -> usize {
+pub unsafe extern "C" fn invoke_passwd_cb<F>(buf: *mut c_char,
+ size: c_int,
+ _rwflag: c_int,
+ cb_state: *mut c_void)
+ -> c_int
+ where F: FnOnce(&mut [c_char]) -> usize
+{
let callback = &mut *(cb_state as *mut CallbackState<F>);
let result = panic::catch_unwind(AssertUnwindSafe(|| {