mirror of https://github.com/fafhrd91/actix-web
use `actix_rt::block_on` in examples
This commit is contained in:
parent
40a4b1ccd5
commit
10bacd6fc0
|
@ -8,7 +8,7 @@ async fn index(req: HttpRequest) -> &'static str {
|
|||
fn main() -> std::io::Result<()> {
|
||||
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
|
||||
|
||||
rt::System::new().block_on(
|
||||
rt::block_on(
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
.wrap(middleware::Logger::default())
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//! }
|
||||
//!
|
||||
//! # fn main() -> std::io::Result<()> {
|
||||
//! rt::System::new().block_on(
|
||||
//! rt::block_on(
|
||||
//! HttpServer::new(|| {
|
||||
//! App::new()
|
||||
//! .wrap(middleware::Logger::default())
|
||||
|
|
Loading…
Reference in New Issue