1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

rename Application

This commit is contained in:
Nikolay Kim
2018-03-31 00:16:55 -07:00
parent 7a743fa6b5
commit 3ee228005d
51 changed files with 237 additions and 238 deletions

View File

@@ -24,10 +24,10 @@ use with::WithHandler;
///
/// ```rust
/// # extern crate actix_web;
/// use actix_web::{Application, HttpResponse, http};
/// use actix_web::{App, HttpResponse, http};
///
/// fn main() {
/// let app = Application::new()
/// let app = App::new()
/// .resource(
/// "/", |r| r.method(http::Method::GET).f(|r| HttpResponse::Ok()))
/// .finish();
@@ -79,7 +79,7 @@ impl<S: 'static> Resource<S> {
/// use actix_web::*;
///
/// fn main() {
/// let app = Application::new()
/// let app = App::new()
/// .resource(
/// "/", |r| r.route()
/// .filter(pred::Any(pred::Get()).or(pred::Put()))
@@ -149,7 +149,7 @@ impl<S: 'static> Resource<S> {
/// Register a middleware
///
/// This is similar to `Application's` middlewares, but
/// This is similar to `App's` middlewares, but
/// middlewares get invoked on resource level.
pub fn middleware<M: Middleware<S>>(&mut self, mw: M) {
Rc::get_mut(&mut self.middlewares).unwrap().push(Box::new(mw));