1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-04-20 06:54:46 +00:00

doctest fix #26

This commit is contained in:
Dominic 2020-05-16 01:01:20 +02:00
parent 604494651d
commit 4ff5a8d7e4
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
3 changed files with 15 additions and 7 deletions

View file

@ -21,9 +21,10 @@ This return type can be used to map another `ResourceResult` that can only be re
client is authenticated. Otherwise, an empty _403 Forbidden_ response will be issued. Use can
look something like this (assuming the `auth` feature is enabled):
```
```rust
# #[cfg(feature = "auth")]
# mod auth_feature_enabled {
# #[macro_use] extern crate gotham_restful_derive;
# mod doc_tests_are_broken {
# use gotham::state::State;
# use gotham_restful::*;
# use serde::Deserialize;
@ -81,8 +82,9 @@ client is authenticated. Otherwise, an empty _403 Forbidden_ response will be is
look something like this (assuming the `auth` feature is enabled):
```
# #[cfg(feature = "auth")]
# mod auth_feature_enabled {
# #[macro_use] extern crate gotham_restful_derive;
# mod doc_tests_are_broken {
# use gotham::state::State;
# use gotham_restful::*;
# use serde::Deserialize;

View file

@ -29,7 +29,7 @@ Usage example:
# struct MyResource;
#
#[derive(Deserialize, Serialize)]
# #[derive(OpenapiType)]
# #[cfg_attr(feature = "openapi", derive(OpenapiType))]
struct MyResponse {
message: &'static str
}