diff --git a/src/context.rs b/src/context.rs index fda5a65f5..5958f8919 100644 --- a/src/context.rs +++ b/src/context.rs @@ -35,7 +35,7 @@ impl Frame { } } -/// Http actor execution context +/// Execution context for http actors pub struct HttpContext where A: Actor>, { inner: ContextImpl, diff --git a/src/de.rs b/src/de.rs index 8e8b501b2..75d3e637e 100644 --- a/src/de.rs +++ b/src/de.rs @@ -24,16 +24,15 @@ use httprequest::HttpRequest; /// # use actix_web::*; /// use actix_web::Path; /// -/// /// Application state -/// struct State {} -/// -/// /// extract path info using serde -/// fn index(info: Path<(String, u32), State>) -> Result { +/// /// extract path info from "/{username}/{count}/?index.html" url +/// /// {username} - deserializes to a String +/// /// {count} - - deserializes to a u32 +/// fn index(info: Path<(String, u32)>) -> Result { /// Ok(format!("Welcome {}! {}", info.0, info.1)) /// } /// /// fn main() { -/// let app = Application::with_state(State{}).resource( +/// let app = Application::new().resource( /// "/{username}/{count}/?index.html", // <- define path parameters /// |r| r.method(Method::GET).with(index)); // <- use `with` extractor /// } diff --git a/src/ws/context.rs b/src/ws/context.rs index 481ff5c06..92151c0d4 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -18,7 +18,7 @@ use ws::frame::Frame; use ws::proto::{OpCode, CloseCode}; -/// `WebSockets` actor execution context +/// Execution context for `WebSockets` actors pub struct WebsocketContext where A: Actor>, { inner: ContextImpl,