Fix example in 'Request::guard()' documentation.

Resolves #378.
This commit is contained in:
Sergio Benitez 2017-08-13 03:13:20 -07:00
parent 3a76fe03db
commit 31cbe65704
1 changed files with 2 additions and 4 deletions

View File

@ -430,12 +430,10 @@ impl<'r> Request<'r> {
///
/// # Example
///
/// Invoke the `Json<T>` request guard.
/// Assuming a `User` request guard exists, invoke it:
///
/// ```rust,ignore
/// use rocket_contrib::Json;
///
/// let outcome = request.guard::<Json<T>>();
/// let outcome = request.guard::<User>();
/// ```
///
/// Retrieve managed state inside of a guard implementation: