diff options
| author | Jonas Schievink <[email protected]> | 2016-06-26 19:44:53 +0200 |
|---|---|---|
| committer | Jonas Schievink <[email protected]> | 2016-06-26 19:44:53 +0200 |
| commit | f24ab2693636f16ce71a171a4d4d63bd0f5bbea0 (patch) | |
| tree | cfdc4e6437337104c8a2e5cb6d39621517597629 /openssl/src/crypto/pkey.rs | |
| parent | Put the test behind the catch_unwind feature (diff) | |
| download | rust-openssl-f24ab2693636f16ce71a171a4d4d63bd0f5bbea0.tar.xz rust-openssl-f24ab2693636f16ce71a171a4d4d63bd0f5bbea0.zip | |
FnMut -> FnOnce, update docs
Diffstat (limited to 'openssl/src/crypto/pkey.rs')
| -rw-r--r-- | openssl/src/crypto/pkey.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openssl/src/crypto/pkey.rs b/openssl/src/crypto/pkey.rs index bbb8427d..15744047 100644 --- a/openssl/src/crypto/pkey.rs +++ b/openssl/src/crypto/pkey.rs @@ -103,9 +103,11 @@ impl PKey { /// /// The callback will be passed the password buffer and should return the number of characters /// placed into the buffer. + /// + /// Requires the `catch_unwind` feature. #[cfg(feature = "catch_unwind")] pub fn private_key_from_pem_cb<R, F>(reader: &mut R, pass_cb: F) -> Result<PKey, SslError> - where R: Read, F: FnMut(&mut [c_char]) -> usize + where R: Read, F: FnOnce(&mut [c_char]) -> usize { let mut cb = CallbackState::new(pass_cb); |