From aa8a19ae31559042d34c10359d3e2fda6fbf67e4 Mon Sep 17 00:00:00 2001 From: mdinger Date: Tue, 7 Jun 2016 19:38:56 -0400 Subject: [PATCH] Typos I tried to fix typos. Take all, any, or update them with your own PR if you wish to maintain ownership of the PR. Definitely interesting. --- src/error-chain/src/lib.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/error-chain/src/lib.rs b/src/error-chain/src/lib.rs index 9a4d73dcdc..725e5674a3 100644 --- a/src/error-chain/src/lib.rs +++ b/src/error-chain/src/lib.rs @@ -17,7 +17,7 @@ //! Similar to other libraries like [error-type] and [quick-error], this //! library defines a macro, `error_chain!` that declares the types //! and implementation boilerplate necessary for fulfilling a -//! particular error-hadling strategy. Most importantly it defines +//! particular error-handling strategy. Most importantly it defines //! a custom error type (called `Error` by convention) and the `From` //! conversions that let the `try!` macro and `?` operator work. //! @@ -106,7 +106,7 @@ //! } //! ``` //! -//! This populates the the module with a number of definitions, +//! This populates the module with a number of definitions, //! the most important of which are the `Error` type //! and the `ErrorKind` type. They look something like the //! following: @@ -147,11 +147,11 @@ //! the macro are expanded to `Dist` and `Utils` variants, and the //! "foreign links" to the `Temp` variant. //! -//! Both types come with a variety of `From` conversiaos as well: -//! `Error` can be created from `ErrorKind`, from `&str` and `String`, -//! and from the "link" and "foreign_link" error types. `ErrorKind` +//! Both types come with a variety of `From` conversions as well: +//! `Error` can be created from `ErrorKind`, `&str` and `String`, +//! and the "link" and "foreign_link" error types. `ErrorKind` //! can be created from the corresponding `ErrorKind`s of the link -//! types, as wall as from `&str` and `String`. +//! types, as well as from `&str` and `String`. //! //! `into()` and `From::from` are used heavily to massage types into //! the right shape. Which one to use in any specific case depends on @@ -176,17 +176,17 @@ //! } //! ``` //! -//! Note that the return type is is the typedef `Result`, which is +//! Note that the return type is the typedef `Result`, which is //! defined by the macro as `pub type Result = //! ::std::result::Result`. Note that in both cases -//! `.into()` is called to convert a type into the `Error` type: both +//! `.into()` is called to convert a type into the `Error` type; both //! strings and `ErrorKind` have `From` conversions to turn them into //! `Error`. //! //! When the error is emitted inside a `try!` macro or behind the -//! `?` operator, then the explicit conversion isn't needed, since -//! the behavior of `try!` will automatically convert `Err(ErrorKind)` -//! to `Err(Error)`. So the below is equivalent to the previous: +//! `?` operator, the explicit conversion isn't needed; `try!` will +//! automatically convert `Err(ErrorKind)` to `Err(Error)`. So the +//! below is equivalent to the previous: //! //! ```rust //! fn foo() -> Result<()> {