1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 16:02:59 +01:00

spelling check

This commit is contained in:
Alexander Andreev 2018-05-06 19:07:30 +03:00
parent a7c40024ce
commit cd11293c1f
11 changed files with 26 additions and 26 deletions

View File

@ -392,7 +392,7 @@ impl ResponseError for ExpectError {
} }
} }
/// A set of error that can occure during parsing content type /// A set of error that can occurred during parsing content type
#[derive(Fail, PartialEq, Debug)] #[derive(Fail, PartialEq, Debug)]
pub enum ContentTypeError { pub enum ContentTypeError {
/// Can not parse content type /// Can not parse content type
@ -542,7 +542,7 @@ impl From<UrlParseError> for UrlGenerationError {
/// Helper type that can wrap any error and generate custom response. /// Helper type that can wrap any error and generate custom response.
/// ///
/// In following example any `io::Error` will be converted into "BAD REQUEST" /// In following example any `io::Error` will be converted into "BAD REQUEST"
/// response as opposite to *INNTERNAL SERVER ERROR* which is defined by /// response as opposite to *INTERNAL SERVER ERROR* which is defined by
/// default. /// default.
/// ///
/// ```rust /// ```rust
@ -850,7 +850,7 @@ mod tests {
} }
macro_rules! from { macro_rules! from {
($from:expr => $error:pat) => { ($from: expr => $error: pat) => {
match ParseError::from($from) { match ParseError::from($from) {
e @ $error => { e @ $error => {
assert!(format!("{}", e).len() >= 5); assert!(format!("{}", e).len() >= 5);
@ -861,7 +861,7 @@ mod tests {
} }
macro_rules! from_and_cause { macro_rules! from_and_cause {
($from:expr => $error:pat) => { ($from: expr => $error: pat) => {
match ParseError::from($from) { match ParseError::from($from) {
e @ $error => { e @ $error => {
let desc = format!("{}", e.cause().unwrap()); let desc = format!("{}", e.cause().unwrap());

View File

@ -715,7 +715,7 @@ mod tests {
} }
#[test] #[test]
fn test_extract_path_signle() { fn test_extract_path_single() {
let mut resource = ResourceHandler::<()>::default(); let mut resource = ResourceHandler::<()>::default();
resource.name("index"); resource.name("index");
let mut routes = Vec::new(); let mut routes = Vec::new();

View File

@ -7,7 +7,7 @@ use self::Charset::*;
/// A Mime charset. /// A Mime charset.
/// ///
/// The string representation is normalised to upper case. /// The string representation is normalized to upper case.
/// ///
/// See [http://www.iana.org/assignments/character-sets/character-sets.xhtml][url]. /// See [http://www.iana.org/assignments/character-sets/character-sets.xhtml][url].
/// ///

View File

@ -199,7 +199,7 @@ impl<S> HttpRequest<S> {
&self.as_ref().extensions &self.as_ref().extensions
} }
/// Mutable refernece to a the request's extensions /// Mutable reference to a the request's extensions
#[inline] #[inline]
pub fn extensions_mut(&mut self) -> &mut Extensions { pub fn extensions_mut(&mut self) -> &mut Extensions {
&mut self.as_mut().extensions &mut self.as_mut().extensions

View File

@ -44,7 +44,7 @@
//! * [HttpRequest](struct.HttpRequest.html) and //! * [HttpRequest](struct.HttpRequest.html) and
//! [HttpResponse](struct.HttpResponse.html): These structs //! [HttpResponse](struct.HttpResponse.html): These structs
//! represent HTTP requests and responses and expose various methods //! represent HTTP requests and responses and expose various methods
//! for inspecting, creating and otherwise utilising them. //! for inspecting, creating and otherwise utilizing them.
//! //!
//! ## Features //! ## Features
//! //!

View File

@ -12,7 +12,7 @@ type ErrorHandler<S> = Fn(&mut HttpRequest<S>, HttpResponse) -> Result<Response>
/// ///
/// You can use `ErrorHandlers::handler()` method to register a custom error /// You can use `ErrorHandlers::handler()` method to register a custom error
/// handler for specific status code. You can modify existing response or /// handler for specific status code. You can modify existing response or
/// create completly new one. /// create completely new one.
/// ///
/// ## Example /// ## Example
/// ///

View File

@ -104,7 +104,7 @@ impl<S: 'static> Route<S> {
self.handler = InnerHandler::async(handler); self.handler = InnerHandler::async(handler);
} }
/// Set handler function, use request extractor for paramters. /// Set handler function, use request extractor for parameters.
/// ///
/// ```rust /// ```rust
/// # extern crate bytes; /// # extern crate bytes;
@ -140,7 +140,7 @@ impl<S: 'static> Route<S> {
cfg cfg
} }
/// Set handler function, use request extractor for both paramters. /// Set handler function, use request extractor for both parameters.
/// ///
/// ```rust /// ```rust
/// # extern crate bytes; /// # extern crate bytes;
@ -189,7 +189,7 @@ impl<S: 'static> Route<S> {
(cfg1, cfg2) (cfg1, cfg2)
} }
/// Set handler function, use request extractor for all paramters. /// Set handler function, use request extractor for all parameters.
pub fn with3<T1, T2, T3, F, R>( pub fn with3<T1, T2, T3, F, R>(
&mut self, handler: F, &mut self, handler: F,
) -> ( ) -> (

View File

@ -150,7 +150,7 @@ enum PatternType {
pub enum ResourceType { pub enum ResourceType {
/// Normal resource /// Normal resource
Normal, Normal,
/// Resource for applicaiton default handler /// Resource for application default handler
Default, Default,
/// External resource /// External resource
External, External,
@ -158,7 +158,7 @@ pub enum ResourceType {
Unset, Unset,
} }
/// Reslource type describes an entry in resources table /// Resource type describes an entry in resources table
#[derive(Clone)] #[derive(Clone)]
pub struct Resource { pub struct Resource {
tp: PatternType, tp: PatternType,
@ -268,7 +268,7 @@ impl Resource {
} }
} }
/// Build reousrce path. /// Build resource path.
pub fn resource_path<U, I>( pub fn resource_path<U, I>(
&self, router: &Router, elements: U, &self, router: &Router, elements: U,
) -> Result<String, UrlGenerationError> ) -> Result<String, UrlGenerationError>

View File

@ -88,7 +88,7 @@ impl TestServer {
/// Create test server builder with specific state factory /// Create test server builder with specific state factory
/// ///
/// This method can be used for constructing application state. /// This method can be used for constructing application state.
/// Also it can be used for external dependecy initialization, /// Also it can be used for external dependency initialization,
/// like creating sync actors for diesel integration. /// like creating sync actors for diesel integration.
pub fn build_with_state<F, S>(state: F) -> TestServerBuilder<S> pub fn build_with_state<F, S>(state: F) -> TestServerBuilder<S>
where where

View File

@ -256,9 +256,9 @@ struct Inner {
closed: bool, closed: bool,
} }
/// Future that implementes client websocket handshake process. /// Future that implemented client websocket handshake process.
/// ///
/// It resolves to a pair of `ClientReadr` and `ClientWriter` that /// It resolves to a pair of `ClientReader` and `ClientWriter` that
/// can be used for reading and writing websocket frames. /// can be used for reading and writing websocket frames.
pub struct ClientHandshake { pub struct ClientHandshake {
request: Option<SendRequest>, request: Option<SendRequest>,

View File

@ -259,7 +259,7 @@ impl StreamHandler<ws::Message, ws::ProtocolError> for ChatClient {
ctx.stop(); ctx.stop();
} }
} else { } else {
println!("not eaqual"); println!("not equal");
} }
} }
_ => (), _ => (),