From 8d58ee2ca3d151c2bc9edf7fc2711c9d82da83c8 Mon Sep 17 00:00:00 2001 From: Martin Habovstiak Date: Fri, 23 Dec 2022 22:50:18 +0100 Subject: [PATCH] Change `#[cfg(docsrs)]` to `#[cfg(doc)]` on `use` The additional `use` items were added to improve the style of documentation. Because they were only used for doc they were `cfg`ed. But because this is independent from being built by `docs.rs` the `cfg` should've been `doc` not `docsrs`. IOW `docsrs` means roughly `all(doc, nightly)` and the added items are unrelated to `nightly`. --- bitcoin/src/blockdata/locktime/absolute.rs | 2 +- bitcoin/src/blockdata/locktime/relative.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoin/src/blockdata/locktime/absolute.rs b/bitcoin/src/blockdata/locktime/absolute.rs index ec519c85..6ac034aa 100644 --- a/bitcoin/src/blockdata/locktime/absolute.rs +++ b/bitcoin/src/blockdata/locktime/absolute.rs @@ -24,7 +24,7 @@ use crate::prelude::*; use crate::parse::{self, impl_parse_str_through_int}; use crate::string::FromHexStr; -#[cfg(docsrs)] +#[cfg(doc)] use crate::absolute; /// The Threshold for deciding whether a lock time value is a height or a time (see [Bitcoin Core]). diff --git a/bitcoin/src/blockdata/locktime/relative.rs b/bitcoin/src/blockdata/locktime/relative.rs index 2da17be2..70f02ffd 100644 --- a/bitcoin/src/blockdata/locktime/relative.rs +++ b/bitcoin/src/blockdata/locktime/relative.rs @@ -13,7 +13,7 @@ use core::convert::TryFrom; #[cfg(all(test, mutate))] use mutagen::mutate; -#[cfg(docsrs)] +#[cfg(doc)] use crate::relative; /// A relative lock time value, representing either a block height or time (512 second intervals).