1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-18 14:16:47 +00:00

add System changes to migration guide

This commit is contained in:
Nikolay Kim 2018-06-02 09:19:13 -07:00
parent cede817915
commit 0457fe4d61

View file

@ -1,5 +1,28 @@
## 0.7
* `actix::System` has new api.
Instead of
```run
fn main() {
let sys = actix::System::new(..);
HttpServer::new(|| ...).start()
sys.run();
}
```
Server must be initialized within system run closure:
```run
fn main() {
actix::System::run(|| {
HttpServer::new(|| ...).start()
});
}
```
* Middleware trait uses `&mut self` instead of `&self`.
* Removed `Route::with2()` and `Route::with3()` use tuple of extractors instead.