mirror of https://github.com/fafhrd91/actix-web
Formatting and adding entry to changelog
This commit is contained in:
parent
9a26ee56fa
commit
5fa6742902
|
@ -4,6 +4,7 @@
|
||||||
### Added
|
### Added
|
||||||
* Implement `exclude_regex` for Logger middleware. [#1723]
|
* Implement `exclude_regex` for Logger middleware. [#1723]
|
||||||
* Add request-local data extractor `web::ReqData`. [#1748]
|
* Add request-local data extractor `web::ReqData`. [#1748]
|
||||||
|
* Add `app_data` to `ServiceConfig`. [#1757]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
* Print non-configured `Data<T>` type when attempting extraction. [#1743]
|
* Print non-configured `Data<T>` type when attempting extraction. [#1743]
|
||||||
|
|
|
@ -270,8 +270,7 @@ mod tests {
|
||||||
cfg.app_data(10usize);
|
cfg.app_data(10usize);
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut srv =
|
let mut srv = init_service(App::new().configure(cfg).service(
|
||||||
init_service(App::new().configure(cfg).service(
|
|
||||||
web::resource("/").to(|_: web::Data<usize>, req: HttpRequest| {
|
web::resource("/").to(|_: web::Data<usize>, req: HttpRequest| {
|
||||||
assert_eq!(*req.app_data::<usize>().unwrap(), 10usize);
|
assert_eq!(*req.app_data::<usize>().unwrap(), 10usize);
|
||||||
HttpResponse::Ok()
|
HttpResponse::Ok()
|
||||||
|
|
Loading…
Reference in New Issue