Merge pull request #822 from sfackler/doc-fixes

Fix docs
This commit is contained in:
Steven Fackler 2018-01-06 21:51:08 -08:00 committed by GitHub
commit db2b8bbc78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -12,16 +12,17 @@
//! use openssl::bn::BigNum; //! use openssl::bn::BigNum;
//! use openssl::error::ErrorStack; //! use openssl::error::ErrorStack;
//! //!
//! fn bignums() -> Result< (), ErrorStack > { //! fn bignums() -> Result<(), ErrorStack> {
//! let a = BigNum::new()?; // a = 0 //! let a = BigNum::new()?; // a = 0
//! let b = BigNum::from_dec_str("1234567890123456789012345")?; //! let b = BigNum::from_dec_str("1234567890123456789012345")?;
//! let c = &a * &b; //! let c = &a * &b;
//! assert_eq!(a,c); //! assert_eq!(a, c);
//! Ok(()) //! Ok(())
//! } //! }
//! # fn main() { //! # fn main() {
//! # bignums(); //! # bignums();
//! # } //! # }
//! ```
//! //!
//! [`BIGNUM`]: https://wiki.openssl.org/index.php/Manual:Bn_internal(3) //! [`BIGNUM`]: https://wiki.openssl.org/index.php/Manual:Bn_internal(3)
use ffi; use ffi;

View File

@ -2247,7 +2247,9 @@ impl<S: Read + Write> SslStream<S> {
/// session down. In particular, it must be fully shut down if the connection is to be used for /// session down. In particular, it must be fully shut down if the connection is to be used for
/// further communication in the future. /// further communication in the future.
/// ///
/// This corresponds to [`SSL_shutdown`]: https://www.openssl.org/docs/man1.0.2/ssl/SSL_shutdown.html /// This corresponds to [`SSL_shutdown`].
///
/// [`SSL_shutdown`]: https://www.openssl.org/docs/man1.0.2/ssl/SSL_shutdown.html
pub fn shutdown(&mut self) -> Result<ShutdownResult, Error> { pub fn shutdown(&mut self) -> Result<ShutdownResult, Error> {
match unsafe { ffi::SSL_shutdown(self.ssl.as_ptr()) } { match unsafe { ffi::SSL_shutdown(self.ssl.as_ptr()) } {
0 => Ok(ShutdownResult::Sent), 0 => Ok(ShutdownResult::Sent),