From 7ddea2791c6762649ea5980800c27b623e337696 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Wed, 6 May 2015 02:25:29 +0200 Subject: [PATCH] docs(misc): fix typos caught by codespell --- CHANGELOG.md | 2 +- src/client/mod.rs | 4 ++-- src/client/request.rs | 2 +- src/error.rs | 2 +- src/method.rs | 2 +- src/server/response.rs | 2 +- src/status.rs | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 296f0c6a..810cb1f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -323,7 +323,7 @@ use new header!() macro. #### Features -* **header:** Support arbitary status codes ([73978531](https://github.com/hyperium/hyper/commit/7397853148b8221c0eb8315ae2e5f195ad2e642c)) +* **header:** Support arbitrary status codes ([73978531](https://github.com/hyperium/hyper/commit/7397853148b8221c0eb8315ae2e5f195ad2e642c)) * **headers:** * Implement PartialOrd for QualityItem ([2859d7ef](https://github.com/hyperium/hyper/commit/2859d7ef4ecadc3927fa46292ebbb225da597690), closes [#314](https://github.com/hyperium/hyper/issues/314)) * add AcceptLanguage header ([20a585e3](https://github.com/hyperium/hyper/commit/20a585e30bbb060a91839de7e95fd75a95d03d93)) diff --git a/src/client/mod.rs b/src/client/mod.rs index 2dc5c555..febcb1d7 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -25,7 +25,7 @@ //! # use hyper::Client; //! let mut client = Client::new(); //! -//! let res = client.post("http://exmaple.domain") +//! let res = client.post("http://example.domain") //! .body("foo=bar") //! .send() //! .unwrap(); @@ -266,7 +266,7 @@ impl<'a, U: IntoUrl> RequestBuilder<'a, U> { } }; match client.redirect_policy { - // separate branches because they cant be one + // separate branches because they can't be one RedirectPolicy::FollowAll => (), //continue RedirectPolicy::FollowIf(cond) if cond(&url) => (), //continue _ => return Ok(res), diff --git a/src/client/request.rs b/src/client/request.rs index 6b9c83ac..33fe724d 100644 --- a/src/client/request.rs +++ b/src/client/request.rs @@ -106,7 +106,7 @@ impl Request { None => () }; - // cant do in match above, thanks borrowck + // can't do in match above, thanks borrowck if chunked { let encodings = match self.headers.get_mut::() { Some(&mut header::TransferEncoding(ref mut encodings)) => { diff --git a/src/error.rs b/src/error.rs index d5db410d..bad242c6 100644 --- a/src/error.rs +++ b/src/error.rs @@ -29,7 +29,7 @@ pub enum Error { TooLarge, /// An invalid `Status`, such as `1337 ELITE`. Status, - /// An `IoError` that occured while trying to read or write to a network stream. + /// An `IoError` that occurred while trying to read or write to a network stream. Io(IoError), } diff --git a/src/method.rs b/src/method.rs index acf4dedf..f3f37aab 100644 --- a/src/method.rs +++ b/src/method.rs @@ -35,7 +35,7 @@ pub enum Method { Connect, /// PATCH Patch, - /// Method extentions. An example would be `let m = Extension("FOO".to_string())`. + /// Method extensions. An example would be `let m = Extension("FOO".to_string())`. Extension(String) } diff --git a/src/server/response.rs b/src/server/response.rs index 16bcfc72..649b1649 100644 --- a/src/server/response.rs +++ b/src/server/response.rs @@ -91,7 +91,7 @@ impl<'a> Response<'a, Fresh> { None => () }; - // cant do in match above, thanks borrowck + // can't do in match above, thanks borrowck if chunked { let encodings = match self.headers.get_mut::() { Some(&mut header::TransferEncoding(ref mut encodings)) => { diff --git a/src/status.rs b/src/status.rs index 2b9df648..6453b48c 100644 --- a/src/status.rs +++ b/src/status.rs @@ -3,7 +3,7 @@ use std::fmt; use std::cmp::Ordering; // shamelessly lifted from Teepee. I tried a few schemes, this really -// does seem like the best. Improved scheme to support arbitary status codes. +// does seem like the best. Improved scheme to support arbitrary status codes. /// An HTTP status code (`status-code` in RFC 7230 et al.). ///