Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix axum-extra's optional feature documentation #663

Merged
merged 1 commit into from
Dec 27, 2021
Merged

Fix axum-extra's optional feature documentation #663

merged 1 commit into from
Dec 27, 2021

Conversation

SabrinaJewson
Copy link
Contributor

Motivation

  • docs.rs doesn't display axum_extra::response::ErasedJson.
  • If it was displayed, it doesn't have the purple feature box.

Solution

Make sure to enable --all-features and --cfg docsrs when building axum_extra on docs.rs, and add the appropriate doc(cfg) to ErasedJson.

@@ -28,6 +28,7 @@ use serde::Serialize;
/// }
/// }
/// ```
#[cfg_attr(docsrs, doc(cfg(feature = "erased-json")))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference, this is needed because of rust-lang/rust#83428.

@jplatte jplatte merged commit 7df6113 into tokio-rs:main Dec 27, 2021
@SabrinaJewson SabrinaJewson deleted the axum-extra-feature-doc branch December 27, 2021 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants