From 8f1c53600714eaf0bd8defec870293bfa4830c1b Mon Sep 17 00:00:00 2001 From: Justin Mayhew Date: Fri, 20 May 2016 11:29:10 -0300 Subject: [PATCH] docs(*): fix typos, Markdown inconsistencies, and stutter --- src/header/common/prefer.rs | 5 ++--- src/method.rs | 2 +- src/net.rs | 8 ++++---- src/server/mod.rs | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/header/common/prefer.rs b/src/header/common/prefer.rs index 1209dba3..70cba216 100644 --- a/src/header/common/prefer.rs +++ b/src/header/common/prefer.rs @@ -5,9 +5,8 @@ use header::parsing::{from_comma_delimited, fmt_comma_delimited}; /// `Prefer` header, defined in [RFC7240](http://tools.ietf.org/html/rfc7240) /// -/// The `Prefer` header field is HTTP header field that can be used by a -/// client to request that certain behaviors be employed by a server -/// while processing a request. +/// The `Prefer` header field can be used by a client to request that certain +/// behaviors be employed by a server while processing a request. /// /// # ABNF /// ```plain diff --git a/src/method.rs b/src/method.rs index 61768f9a..d158bc34 100644 --- a/src/method.rs +++ b/src/method.rs @@ -73,7 +73,7 @@ impl Method { } /// Whether a method is considered "idempotent", meaning the request has - /// the same result is executed multiple times. + /// the same result if executed multiple times. /// /// See [the spec](https://tools.ietf.org/html/rfc7231#section-4.2.2) for /// more words. diff --git a/src/net.rs b/src/net.rs index f93d00a8..903142e9 100644 --- a/src/net.rs +++ b/src/net.rs @@ -179,7 +179,7 @@ pub trait Ssl { fn wrap_server(&self, stream: HttpStream) -> ::Result; } -/// An abstraction to allow any SSL implementation to be used with client-side HttpsStreams. +/// An abstraction to allow any SSL implementation to be used with client-side `HttpsStream`s. pub trait SslClient { /// The protected stream. type Stream: Transport; @@ -187,7 +187,7 @@ pub trait SslClient { fn wrap_client(&self, stream: HttpStream, host: &str) -> ::Result; } -/// An abstraction to allow any SSL implementation to be used with server-side HttpsStreams. +/// An abstraction to allow any SSL implementation to be used with server-side `HttpsStream`s. pub trait SslServer { /// The protected stream. type Stream: Transport; @@ -323,7 +323,7 @@ impl Transport for HttpsStream { } } -/// A Http Listener over SSL. +/// An `HttpListener` over SSL. #[derive(Debug)] pub struct HttpsListener { listener: TcpListener, @@ -340,7 +340,7 @@ impl HttpsListener { }) } - /// Construct an HttpsListener from a bound `TcpListener`. + /// Construct an `HttpsListener` from a bound `TcpListener`. pub fn with_listener(listener: TcpListener, ssl: S) -> HttpsListener { HttpsListener { listener: listener, diff --git a/src/server/mod.rs b/src/server/mod.rs index 1c1f5b7f..996631f0 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -1,6 +1,6 @@ //! HTTP Server //! -//! A `Server` is created to listen on port, parse HTTP requests, and hand +//! A `Server` is created to listen on a port, parse HTTP requests, and hand //! them off to a `Handler`. use std::fmt; use std::net::SocketAddr;