docs: Add missing doc_cfg

This commit is contained in:
Kévin Commaille 2021-04-07 12:17:36 +02:00
parent e049e45423
commit 2f406e63a4
No known key found for this signature in database
GPG Key ID: 483BCF4C5AF1E1E5
2 changed files with 2 additions and 0 deletions

View File

@ -113,6 +113,7 @@
#![recursion_limit = "1024"] #![recursion_limit = "1024"]
#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)] #![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)]
#![cfg_attr(docsrs, feature(doc_cfg))]
// This lint is no good // This lint is no good
#![allow(clippy::new_without_default)] #![allow(clippy::new_without_default)]
// Remove this once our MSRV is >= 1.53 // Remove this once our MSRV is >= 1.53

View File

@ -489,6 +489,7 @@ impl TextMessageEventContent {
/// A convenience constructor to create a markdown message. /// A convenience constructor to create a markdown message.
#[cfg(feature = "markdown")] #[cfg(feature = "markdown")]
#[cfg_attr(docsrs, doc(cfg(feature = "markdown")))]
pub fn markdown(body: impl Into<String>) -> Self { pub fn markdown(body: impl Into<String>) -> Self {
let body = body.into(); let body = body.into();
let mut html_body = String::new(); let mut html_body = String::new();