1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +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

@@ -279,7 +279,7 @@ impl<S> HttpRequest<S> {
///
/// ```rust
/// # extern crate actix_web;
/// # use actix_web::{Application, HttpRequest, HttpResponse, http};
/// # use actix_web::{App, HttpRequest, HttpResponse, http};
/// #
/// fn index(req: HttpRequest) -> HttpResponse {
/// let url = req.url_for("foo", &["1", "2", "3"]); // <- generate url for "foo" resource
@@ -287,7 +287,7 @@ impl<S> HttpRequest<S> {
/// }
///
/// fn main() {
/// let app = Application::new()
/// let app = App::new()
/// .resource("/test/{one}/{two}/{three}", |r| {
/// r.name("foo"); // <- set resource name, then it could be used in `url_for`
/// r.method(http::Method::GET).f(|_| HttpResponse::Ok());