From 7df611319e2f9a2fa691215553f35efa19b7a49a Mon Sep 17 00:00:00 2001 From: Sabrina Jewson Date: Mon, 27 Dec 2021 17:12:46 +0000 Subject: [PATCH] Fix axum-extra's optional feature documentation (#663) --- axum-extra/Cargo.toml | 4 ++++ axum-extra/src/response/erased_json.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/axum-extra/Cargo.toml b/axum-extra/Cargo.toml index a96ee1e3..6d91e918 100644 --- a/axum-extra/Cargo.toml +++ b/axum-extra/Cargo.toml @@ -31,3 +31,7 @@ serde_json = { version = "1.0.71", optional = true } hyper = "0.14" tokio = { version = "1.14", features = ["full"] } tower = { version = "0.4", features = ["util"] } + +[package.metadata.docs.rs] +all-features = true +rustdocflags = ["--cfg", "docsrs"] diff --git a/axum-extra/src/response/erased_json.rs b/axum-extra/src/response/erased_json.rs index c66ee461..cf1b675f 100644 --- a/axum-extra/src/response/erased_json.rs +++ b/axum-extra/src/response/erased_json.rs @@ -28,6 +28,7 @@ use serde::Serialize; /// } /// } /// ``` +#[cfg_attr(docsrs, doc(cfg(feature = "erased-json")))] #[derive(Debug)] pub struct ErasedJson(serde_json::Result>);