mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 08:22:59 +01:00
commit
096dee519c
@ -71,7 +71,7 @@ Here is full source of main.rs file:
|
|||||||
|
|
||||||
```rust
|
```rust
|
||||||
# use std::thread;
|
# use std::thread;
|
||||||
# extern crate actix_web;
|
extern crate actix_web;
|
||||||
use actix_web::*;
|
use actix_web::*;
|
||||||
|
|
||||||
fn index(req: HttpRequest) -> &'static str {
|
fn index(req: HttpRequest) -> &'static str {
|
||||||
@ -79,6 +79,9 @@ fn index(req: HttpRequest) -> &'static str {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
# // In the doctest suite we can't run blocking code - deliberately leak a thread
|
||||||
|
# // If copying this example in show-all mode make sure you skip the thread spawn
|
||||||
|
# // call.
|
||||||
# thread::spawn(|| {
|
# thread::spawn(|| {
|
||||||
HttpServer::new(
|
HttpServer::new(
|
||||||
|| Application::new()
|
|| Application::new()
|
||||||
|
Loading…
Reference in New Issue
Block a user