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:
24
MIGRATION.md
24
MIGRATION.md
@ -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`.
|
||||
|
||||
|
Reference in New Issue
Block a user