mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-30 18:34:36 +01:00
fix layout
This commit is contained in:
parent
0457fe4d61
commit
33326ea41b
@ -4,18 +4,19 @@
|
|||||||
|
|
||||||
Instead of
|
Instead of
|
||||||
|
|
||||||
```run
|
```rust
|
||||||
fn main() {
|
fn main() {
|
||||||
let sys = actix::System::new(..);
|
let sys = actix::System::new(..);
|
||||||
|
|
||||||
HttpServer::new(|| ...).start()
|
HttpServer::new(|| ...).start()
|
||||||
|
|
||||||
sys.run();
|
sys.run();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Server must be initialized within system run closure:
|
Server must be initialized within system run closure:
|
||||||
|
|
||||||
```run
|
```rust
|
||||||
fn main() {
|
fn main() {
|
||||||
actix::System::run(|| {
|
actix::System::run(|| {
|
||||||
HttpServer::new(|| ...).start()
|
HttpServer::new(|| ...).start()
|
||||||
@ -32,7 +33,7 @@
|
|||||||
* Removed deprecated `HttpServer::threads()`, use `HttpServer::workers()` instead.
|
* Removed deprecated `HttpServer::threads()`, use `HttpServer::workers()` instead.
|
||||||
|
|
||||||
|
|
||||||
## Migration from 0.5 to 0.6
|
## 0.6
|
||||||
|
|
||||||
* `Path<T>` extractor return `ErrorNotFound` on failure instead of `ErrorBadRequest`
|
* `Path<T>` extractor return `ErrorNotFound` on failure instead of `ErrorBadRequest`
|
||||||
|
|
||||||
@ -84,7 +85,7 @@
|
|||||||
you need to use `use actix_web::ws::WsWriter`
|
you need to use `use actix_web::ws::WsWriter`
|
||||||
|
|
||||||
|
|
||||||
## Migration from 0.4 to 0.5
|
## 0.5
|
||||||
|
|
||||||
* `HttpResponseBuilder::body()`, `.finish()`, `.json()`
|
* `HttpResponseBuilder::body()`, `.finish()`, `.json()`
|
||||||
methods return `HttpResponse` instead of `Result<HttpResponse>`
|
methods return `HttpResponse` instead of `Result<HttpResponse>`
|
||||||
|
Loading…
Reference in New Issue
Block a user