mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 18:37:41 +02:00
rename Application
This commit is contained in:
@ -38,13 +38,13 @@ pub(crate) const MAX_WRITE_BUFFER_SIZE: usize = 65_536;
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// use actix::*;
|
||||
/// use actix_web::{server, Application, HttpResponse};
|
||||
/// use actix_web::{server, App, HttpResponse};
|
||||
///
|
||||
/// fn main() {
|
||||
/// let sys = actix::System::new("guide");
|
||||
///
|
||||
/// server::new(
|
||||
/// || Application::new()
|
||||
/// || App::new()
|
||||
/// .resource("/", |r| r.f(|_| HttpResponse::Ok())))
|
||||
/// .bind("127.0.0.1:59080").unwrap()
|
||||
/// .start();
|
||||
|
@ -268,7 +268,7 @@ impl<H: IntoHttpHandler> HttpServer<H>
|
||||
/// let sys = actix::System::new("example"); // <- create Actix system
|
||||
///
|
||||
/// HttpServer::new(
|
||||
/// || Application::new()
|
||||
/// || App::new()
|
||||
/// .resource("/", |r| r.h(|_| HttpResponse::Ok())))
|
||||
/// .bind("127.0.0.1:0").expect("Can not bind to 127.0.0.1:0")
|
||||
/// .start();
|
||||
@ -326,7 +326,7 @@ impl<H: IntoHttpHandler> HttpServer<H>
|
||||
///
|
||||
/// fn main() {
|
||||
/// HttpServer::new(
|
||||
/// || Application::new()
|
||||
/// || App::new()
|
||||
/// .resource("/", |r| r.h(|_| HttpResponse::Ok())))
|
||||
/// .bind("127.0.0.1:0").expect("Can not bind to 127.0.0.1:0")
|
||||
/// .run();
|
||||
|
Reference in New Issue
Block a user