mirror of
https://github.com/actix/actix-web.git
synced 2024-12-19 14:49:01 +00:00
add System changes to migration guide
This commit is contained in:
parent
cede817915
commit
0457fe4d61
1 changed files with 23 additions and 0 deletions
23
MIGRATION.md
23
MIGRATION.md
|
@ -1,5 +1,28 @@
|
||||||
## 0.7
|
## 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`.
|
* Middleware trait uses `&mut self` instead of `&self`.
|
||||||
|
|
||||||
* Removed `Route::with2()` and `Route::with3()` use tuple of extractors instead.
|
* Removed `Route::with2()` and `Route::with3()` use tuple of extractors instead.
|
||||||
|
|
Loading…
Reference in a new issue