From 20818b0f951f75cb8a6e86582784e47b1975cbc1 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sat, 16 May 2020 01:03:17 +0200 Subject: [PATCH] enable doc test for default features --- .gitlab-ci.yml | 1 + src/lib.rs | 2 +- src/result/auth_result.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f38bdf..fb7c703 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,7 @@ test-default: - cargo -V - cargo sweep -s script: + - cargo test --workspace --doc - cargo test --workspace --tests - cargo test --workspace --tests -- --ignored after_script: diff --git a/src/lib.rs b/src/lib.rs index 5b9dc6d..6bef905 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -123,9 +123,9 @@ None of this is currently supported by gotham's own JWT middleware. A simple example that uses only a single secret could look like this: ```rust,no_run +# #[macro_use] extern crate gotham_restful_derive; # #[cfg(feature = "auth")] # mod auth_feature_enabled { -# #[macro_use] extern crate gotham_restful_derive; # use gotham::{router::builder::*, pipeline::{new_pipeline, single::single_pipeline}, state::State}; # use gotham_restful::*; # use serde::{Deserialize, Serialize}; diff --git a/src/result/auth_result.rs b/src/result/auth_result.rs index 5c54efc..bc3f84f 100644 --- a/src/result/auth_result.rs +++ b/src/result/auth_result.rs @@ -22,9 +22,9 @@ client is authenticated. Otherwise, an empty _403 Forbidden_ response will be is look something like this (assuming the `auth` feature is enabled): ```rust +# #[macro_use] extern crate gotham_restful_derive; # #[cfg(feature = "auth")] # mod auth_feature_enabled { -# #[macro_use] extern crate gotham_restful_derive; # use gotham::state::State; # use gotham_restful::*; # use serde::Deserialize; @@ -82,9 +82,9 @@ client is authenticated. Otherwise, an empty _403 Forbidden_ response will be is look something like this (assuming the `auth` feature is enabled): ``` +# #[macro_use] extern crate gotham_restful_derive; # #[cfg(feature = "auth")] # mod auth_feature_enabled { -# #[macro_use] extern crate gotham_restful_derive; # use gotham::state::State; # use gotham_restful::*; # use serde::Deserialize;