mirror of
https://github.com/fafhrd91/actix-web
synced 2025-02-21 11:54:47 +01:00
fix doc test
This commit is contained in:
parent
b4ff6addfe
commit
5dcb250237
@ -11,7 +11,7 @@
|
||||

|
||||
[](https://deps.rs/crate/actix-web/4.0.0-beta.18)
|
||||
<br />
|
||||
[](https://github.com/actix/actix-web/actions)
|
||||
[](https://github.com/actix/actix-web/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/actix/actix-web)
|
||||

|
||||
[](https://discord.gg/NWpN5mmg3x)
|
||||
|
@ -286,10 +286,10 @@ impl HttpRequest {
|
||||
///
|
||||
/// # Examples
|
||||
/// ```no_run
|
||||
/// # use actix_web::{web, test::TestRequest};
|
||||
/// # use actix_web::{test::TestRequest, web::Data};
|
||||
/// # let req = TestRequest::default().to_http_request();
|
||||
/// # type T = u32;
|
||||
/// let opt_t: Option<&T> = req.app_data::<web::Data<T>>();
|
||||
/// let opt_t: Option<&Data<T>> = req.app_data::<Data<T>>();
|
||||
/// ```
|
||||
///
|
||||
/// [`Data`]: crate::web::Data
|
||||
|
Loading…
x
Reference in New Issue
Block a user