Skip to content

Commit

Permalink
spelling check
Browse files Browse the repository at this point in the history
  • Loading branch information
ava57r committed Mar 24, 2018
1 parent d46854b commit 2d80c50
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 Nikilay Kim
Copyright (c) 2017 Nikolay Kim

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
Expand Down
4 changes: 2 additions & 2 deletions examples/http-proxy/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn index(_req: HttpRequest) -> Box<Future<Item=HttpResponse, Error=Error>> {
.map_err(error::Error::from) // <- convert SendRequestError to an Error
.and_then(
|resp| resp.body() // <- this is MessageBody type, resolves to complete body
.from_err() // <- convet PayloadError to a Error
.from_err() // <- convert PayloadError to a Error
.and_then(|body| { // <- we got complete body, now send as server response
httpcodes::HttpOk.build()
.body(body)
Expand All @@ -36,7 +36,7 @@ fn streaming(_req: HttpRequest) -> Box<Future<Item=HttpResponse, Error=Error>> {
// read one chunk from client response and send this chunk to a server response
// .from_err() converts PayloadError to a Error
.body(Body::Streaming(Box::new(resp.from_err())))
.map_err(|e| e.into()) // HttpOk::build() mayb return HttpError, we need to convert it to a Error
.map_err(|e| e.into()) // HttpOk::build() maybe return HttpError, we need to convert it to a Error
})
.responder()
}
Expand Down
2 changes: 1 addition & 1 deletion examples/state/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct AppState {
counter: Cell<usize>,
}

/// somple handle
/// simple handle
fn index(req: HttpRequest<AppState>) -> HttpResponse {
println!("{:?}", req);
req.state().counter.set(req.state().counter.get() + 1);
Expand Down
2 changes: 1 addition & 1 deletion guide/src/qs_14.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Handler<CreateUser> for DbExecutor {
name: &msg.name,
};
// normal diesl operations
// normal diesel operations
diesel::insert_into(users)
.values(&new_user)
.execute(&self.0)
Expand Down
2 changes: 1 addition & 1 deletion src/header/common/accept_charset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ header! {
(AcceptCharset, http::ACCEPT_CHARSET) => (QualityItem<Charset>)+

test_accept_charset {
/// Testcase from RFC
/// Test case from RFC
test_header!(test1, vec![b"iso-8859-5, unicode-1-1;q=0.8"]);
}
}
2 changes: 1 addition & 1 deletion src/header/common/expires.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ header! {
(Expires, http::EXPIRES) => [HttpDate]

test_expires {
// Testcase from RFC
// Test case from RFC
test_header!(test1, vec![b"Thu, 01 Dec 1994 16:00:00 GMT"]);
}
}
2 changes: 1 addition & 1 deletion src/header/common/if_modified_since.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ header! {
(IfModifiedSince, http::IF_MODIFIED_SINCE) => [HttpDate]

test_if_modified_since {
// Testcase from RFC
// Test case from RFC
test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
}
}
2 changes: 1 addition & 1 deletion src/header/common/if_unmodified_since.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ header! {
(IfUnmodifiedSince, http::IF_UNMODIFIED_SINCE) => [HttpDate]

test_if_unmodified_since {
// Testcase from RFC
// Test case from RFC
test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
}
}
2 changes: 1 addition & 1 deletion src/header/common/last_modified.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ header! {
(LastModified, http::LAST_MODIFIED) => [HttpDate]

test_last_modified {
// Testcase from RFC
// Test case from RFC
test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);}
}
2 changes: 1 addition & 1 deletion src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ impl<'a> ConnectionInfo<'a> {
///
/// - Forwarded
/// - X-Forwarded-For
/// - peername of opened socket
/// - peer name of opened socket
#[inline]
pub fn remote(&self) -> Option<&str> {
if let Some(r) = self.remote {
Expand Down
4 changes: 2 additions & 2 deletions src/ws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ pub enum ProtocolError {
/// A payload reached size limit.
#[fail(display="A payload reached size limit.")]
Overflow,
/// Continuation is not supproted
#[fail(display="Continuation is not supproted.")]
/// Continuation is not supported
#[fail(display="Continuation is not supported.")]
NoContinuation,
/// Bad utf-8 encoding
#[fail(display="Bad utf-8 encoding.")]
Expand Down

0 comments on commit 2d80c50

Please sign in to comment.