1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-17 13:46:36 +00:00

update readme example

This commit is contained in:
Nikolay Kim 2018-03-31 17:15:44 -07:00
parent 97e2bcd055
commit a5a36ff194

View file

@ -33,7 +33,7 @@ Actix web is a simple, pragmatic, extremely fast, web framework for Rust.
```rust
extern crate actix_web;
use actix_web::{Application, HttpServer, Path};
use actix_web::{App, HttpServer, Path};
fn index(info: Path<(String, u32)>) -> String {
format!("Hello {}! id:{}", info.0, info.1)
@ -41,7 +41,7 @@ fn index(info: Path<(String, u32)>) -> String {
fn main() {
HttpServer::new(
|| Application::new()
|| App::new()
.resource("/{name}/{id}/index.html", |r| r.with(index)))
.bind("127.0.0.1:8080").unwrap()
.run();