diff --git a/src/client/conn.rs b/src/client/conn.rs index e136fda3..d030c27a 100644 --- a/src/client/conn.rs +++ b/src/client/conn.rs @@ -1,6 +1,6 @@ //! Lower-level client connection API. //! -//! The types in thie module are to provide a lower-level API based around a +//! The types in this module are to provide a lower-level API based around a //! single connection. Connecting to a host, pooling connections, and the like //! are not handled at this level. This module provides the building blocks to //! customize those things externally. @@ -177,7 +177,7 @@ where /// does for you that will not be done here: /// /// - `Client` requires absolute-form `Uri`s, since the scheme and - /// authority are need to connect. They aren't required here. + /// authority are needed to connect. They aren't required here. /// - Since the `Client` requires absolute-form `Uri`s, it can add /// the `Host` header based on it. You must add a `Host` header yourself /// before calling this method. diff --git a/src/client/mod.rs b/src/client/mod.rs index cc4137d2..ebc538b8 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -71,7 +71,7 @@ //! //! // A runtime is needed to execute our asynchronous code. In order to //! // spawn the future into the runtime, it should already have been -//! // started and running before calling this this code. +//! // started and running before calling this code. //! rt::spawn(fut); //! # } //! # fn main () {} diff --git a/src/proto/mod.rs b/src/proto/mod.rs index 7cd997f8..0e0cd62c 100644 --- a/src/proto/mod.rs +++ b/src/proto/mod.rs @@ -35,7 +35,7 @@ pub enum BodyLength { Unknown, } -/// Status of when an Disaptcher future completes. +/// Status of when a Disaptcher future completes. pub(crate) enum Dispatched { /// Dispatcher completely shutdown connection. Shutdown, diff --git a/src/server/conn.rs b/src/server/conn.rs index fda17ab1..d66c3add 100644 --- a/src/server/conn.rs +++ b/src/server/conn.rs @@ -1,6 +1,6 @@ //! Lower-level Server connection API. //! -//! The types in thie module are to provide a lower-level API based around a +//! The types in this module are to provide a lower-level API based around a //! single connection. Accepting a connection and binding it with a service //! are not handled at this level. This module provides the building blocks to //! customize those things externally. @@ -48,14 +48,14 @@ pub struct Http { pipeline_flush: bool, } -/// The internal mode of HTTP protocol which indicates the behavior when an parse error occurs. +/// The internal mode of HTTP protocol which indicates the behavior when a parse error occurs. #[derive(Clone, Debug, PartialEq)] enum ConnectionMode { - /// Always use HTTP/1 and do not upgrade when an parse error occurs. + /// Always use HTTP/1 and do not upgrade when a parse error occurs. H1Only, /// Always use HTTP/2. H2Only, - /// Use HTTP/1 and try to upgrade to h2 when an parse error occurs. + /// Use HTTP/1 and try to upgrade to h2 when a parse error occurs. Fallback, } @@ -217,7 +217,7 @@ impl Http { /// Aggregates flushes to better support pipelined responses. /// - /// Experimental, may be have bugs. + /// Experimental, may have bugs. /// /// Default is false. pub fn pipeline_flush(&mut self, enabled: bool) -> &mut Self { diff --git a/src/service/new_service.rs b/src/service/new_service.rs index ce90a69b..37a7dbe6 100644 --- a/src/service/new_service.rs +++ b/src/service/new_service.rs @@ -26,7 +26,7 @@ pub trait NewService { /// The future returned from `new_service` of a `Service`. type Future: Future; - /// The error type that can be returned when creating a new `Service. + /// The error type that can be returned when creating a new `Service`. type InitError: Into>; /// Create a new `Service`. diff --git a/src/service/service.rs b/src/service/service.rs index a1165b2a..0f9d7e20 100644 --- a/src/service/service.rs +++ b/src/service/service.rs @@ -16,7 +16,7 @@ pub trait Service { /// The `Payload` body of the `http::Response`. type ResBody: Payload; - /// The error type that can occur within this `Service. + /// The error type that can occur within this `Service`. /// /// Note: Returning an `Error` to a hyper server will cause the connection /// to be abruptly aborted. In most cases, it is better to return a `Response`