docs(lib): Fix some typos
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							ae34a86cc3
						
					
				
				
					commit
					51223efb8a
				
			| @@ -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. | ||||
|   | ||||
| @@ -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 () {} | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
| @@ -26,7 +26,7 @@ pub trait NewService { | ||||
|     /// The future returned from `new_service` of a `Service`. | ||||
|     type Future: Future<Item=Self::Service, Error=Self::InitError>; | ||||
|  | ||||
|     /// 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<Box<StdError + Send + Sync>>; | ||||
|  | ||||
|     /// Create a new `Service`. | ||||
|   | ||||
| @@ -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` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user