1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-29 16:14:58 +02:00

remove wrong doc example

This commit is contained in:
Nikolay Kim
2018-09-11 11:28:13 -07:00
parent b0d120c101
commit f0554efb98
3 changed files with 14 additions and 38 deletions

View File

@ -113,26 +113,6 @@ impl Server {
///
/// This function is useful for moving parts of configuration to a
/// different module or event library.
///
/// ```rust
/// # extern crate actix_web;
/// use actix_web::{fs, middleware, App, HttpResponse};
///
/// // this function could be located in different module
/// fn config(app: App) -> App {
/// app.resource("/test", |r| {
/// r.get().f(|_| HttpResponse::Ok());
/// r.head().f(|_| HttpResponse::MethodNotAllowed());
/// })
/// }
///
/// fn main() {
/// let app = App::new()
/// .middleware(middleware::Logger::default())
/// .configure(config) // <- register resources
/// .handler("/static", fs::StaticFiles::new(".").unwrap());
/// }
/// ```
pub fn configure<F>(self, cfg: F) -> Server
where
F: Fn(Server) -> Server,