diff options
| author | Steven Fackler <[email protected]> | 2016-06-02 08:35:37 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-06-02 08:35:37 -0700 |
| commit | 1c47b3bb8455b8c61380cedc3fcea9a2a77c5260 (patch) | |
| tree | 41cc2d7b194554747ada1459daf991e1ac68668e /openssl/src/ssl | |
| parent | Add a new trait based Nid setup (diff) | |
| parent | Fix a few mutable types for `self` parameters. (diff) | |
| download | rust-openssl-1c47b3bb8455b8c61380cedc3fcea9a2a77c5260.tar.xz rust-openssl-1c47b3bb8455b8c61380cedc3fcea9a2a77c5260.zip | |
Merge pull request #404 from frewsxcv/mut2
Fix a few mutable types for `self` parameters.
Diffstat (limited to 'openssl/src/ssl')
| -rw-r--r-- | openssl/src/ssl/mod.rs | 6 | ||||
| -rw-r--r-- | openssl/src/ssl/tests/mod.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 5536a99e..89a7f7d4 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -521,13 +521,13 @@ impl SslContext { } } - pub fn set_read_ahead(&self, m: u32) { + pub fn set_read_ahead(&mut self, m: u32) { unsafe { ffi_extras::SSL_CTX_set_read_ahead(self.ctx, m as c_long); } } - pub fn set_tmp_dh(&self, dh: DH) -> Result<(), ErrorStack> { + pub fn set_tmp_dh(&mut self, dh: DH) -> Result<(), ErrorStack> { wrap_ssl_result(unsafe { ffi_extras::SSL_CTX_set_tmp_dh(self.ctx, dh.raw()) as i32 }) } @@ -647,7 +647,7 @@ impl SslContext { SslContextOptions::from_bits(ret).unwrap() } - pub fn options(&mut self) -> SslContextOptions { + pub fn options(&self) -> SslContextOptions { let ret = unsafe { ffi_extras::SSL_CTX_get_options(self.ctx) }; SslContextOptions::from_bits(ret).unwrap() } diff --git a/openssl/src/ssl/tests/mod.rs b/openssl/src/ssl/tests/mod.rs index cc376cf4..94bb4b4b 100644 --- a/openssl/src/ssl/tests/mod.rs +++ b/openssl/src/ssl/tests/mod.rs @@ -437,7 +437,7 @@ fn test_set_certificate_and_private_key() { } run_test!(get_ctx_options, |method, _| { - let mut ctx = SslContext::new(method).unwrap(); + let ctx = SslContext::new(method).unwrap(); ctx.options(); }); |