1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

use Route for Applicaiton handlers

This commit is contained in:
Nikolay Kim
2017-12-04 14:53:40 -08:00
parent f5d6179a34
commit e332c1242f
16 changed files with 61 additions and 80 deletions

View File

@@ -9,7 +9,7 @@ use std::path::{Path, PathBuf};
use std::ops::{Deref, DerefMut};
use mime_guess::get_mime_type;
use route::{Handler, FromRequest};
use handler::{Handler, FromRequest};
use recognizer::FromParam;
use httprequest::HttpRequest;
use httpresponse::HttpResponse;
@@ -198,7 +198,7 @@ impl FromRequest for FilesystemElement {
///
/// fn main() {
/// let app = actix_web::Application::default("/")
/// .route("/static", actix_web::fs::StaticFiles::new(".", true))
/// .route("/static", |r| r.h(actix_web::fs::StaticFiles::new(".", true)))
/// .finish();
/// }
/// ```