1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

update doc api examples

This commit is contained in:
Nikolay Kim
2018-06-17 04:09:07 +06:00
parent a7a062fb68
commit 70244c29e0
5 changed files with 26 additions and 50 deletions

View File

@ -1,29 +1,5 @@
## 0.7
* `actix::System` has new api.
Instead of
```rust
fn main() {
let sys = actix::System::new(..);
HttpServer::new(|| ...).start()
sys.run();
}
```
Server must be initialized within system run closure:
```rust
fn main() {
actix::System::run(|| {
HttpServer::new(|| ...).start()
});
}
```
* [Middleware](https://actix.rs/actix-web/actix_web/middleware/trait.Middleware.html)
trait uses `&mut self` instead of `&self`.