Skip to content

Commit

Permalink
inout: use doc_auto_cfg (#1118)
Browse files Browse the repository at this point in the history
Removes manual rustdoc feature annotations and performs them
automatically
  • Loading branch information
tarcieri authored Sep 28, 2024
1 parent ab0c802 commit 3f94c9c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion inout/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ impl core::error::Error for NotEqualError {}

/// Padding error. Usually emitted when size of output buffer is insufficient.
#[cfg(feature = "block-padding")]
#[cfg_attr(docsrs, doc(cfg(feature = "block-padding")))]
#[derive(Clone, Copy, Debug)]
pub struct PadError;

Expand Down
3 changes: 1 addition & 2 deletions inout/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![allow(clippy::needless_lifetimes)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs, rust_2018_idioms)]

#[cfg(feature = "block-padding")]
#[cfg_attr(docsrs, doc(cfg(feature = "block-padding")))]
pub use block_padding;

mod errors;
Expand Down
2 changes: 0 additions & 2 deletions inout/src/reserved.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ impl<'inp, 'out, T> InOutBufReserved<'inp, 'out, T> {
impl<'inp, 'out> InOutBufReserved<'inp, 'out, u8> {
/// Transform buffer into [`PaddedInOutBuf`] using padding algorithm `P`.
#[cfg(feature = "block-padding")]
#[cfg_attr(docsrs, doc(cfg(feature = "block-padding")))]
#[inline(always)]
pub fn into_padded_blocks<P, BS>(self) -> Result<PaddedInOutBuf<'inp, 'out, BS>, PadError>
where
Expand Down Expand Up @@ -183,7 +182,6 @@ impl<'inp, 'out> InOutBufReserved<'inp, 'out, u8> {

/// Variant of [`InOutBuf`] with optional padded tail block.
#[cfg(feature = "block-padding")]
#[cfg_attr(docsrs, doc(cfg(feature = "block-padding")))]
pub struct PaddedInOutBuf<'inp, 'out, BS: ArraySize> {
blocks: InOutBuf<'inp, 'out, Array<u8, BS>>,
tail_in: Array<u8, BS>,
Expand Down

0 comments on commit 3f94c9c

Please sign in to comment.