mirror of
https://github.com/actix/actix-web.git
synced 2024-11-26 03:21:08 +00:00
fix doc test
This commit is contained in:
parent
b4ff6addfe
commit
5dcb250237
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@
|
|||
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg)
|
||||
[![Dependency Status](https://deps.rs/crate/actix-web/4.0.0-beta.18/status.svg)](https://deps.rs/crate/actix-web/4.0.0-beta.18)
|
||||
<br />
|
||||
[![build status](https://github.com/actix/actix-web/workflows/CI%20%28Linux%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix-web/actions)
|
||||
[![CI](https://github.com/actix/actix-web/actions/workflows/ci.yml/badge.svg)](https://github.com/actix/actix-web/actions/workflows/ci.yml)
|
||||
[![codecov](https://codecov.io/gh/actix/actix-web/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-web)
|
||||
![downloads](https://img.shields.io/crates/d/actix-web.svg)
|
||||
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](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…
Reference in a new issue