From c1a62cbbc80b727c7121f7334e61c1220db38640 Mon Sep 17 00:00:00 2001 From: Hans Kratz Date: Sat, 14 Sep 2024 09:52:44 +0200 Subject: [PATCH] clippy: allow long first paragraphs in select... fn doc comments --- futures-util/src/async_await/select_mod.rs | 2 ++ futures-util/src/async_await/stream_select_mod.rs | 1 + futures-util/src/stream/select_with_strategy.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/futures-util/src/async_await/select_mod.rs b/futures-util/src/async_await/select_mod.rs index 84c6ca5a38..638a92eb13 100644 --- a/futures-util/src/async_await/select_mod.rs +++ b/futures-util/src/async_await/select_mod.rs @@ -3,6 +3,7 @@ macro_rules! document_select_macro { // This branch is required for `futures 0.3.1`, from before select_biased was introduced ($select:item) => { + #[allow(clippy::too_long_first_doc_paragraph)] /// Polls multiple futures and streams simultaneously, executing the branch /// for the future that finishes first. If multiple futures are ready, /// one will be pseudo-randomly selected at runtime. Futures directly @@ -153,6 +154,7 @@ macro_rules! document_select_macro { ($select:item $select_biased:item) => { document_select_macro!($select); + #[allow(clippy::too_long_first_doc_paragraph)] /// Polls multiple futures and streams simultaneously, executing the branch /// for the future that finishes first. Unlike [`select!`], if multiple futures are ready, /// one will be selected in order of declaration. Futures directly diff --git a/futures-util/src/async_await/stream_select_mod.rs b/futures-util/src/async_await/stream_select_mod.rs index 541b4cd96a..039e65a658 100644 --- a/futures-util/src/async_await/stream_select_mod.rs +++ b/futures-util/src/async_await/stream_select_mod.rs @@ -3,6 +3,7 @@ #[doc(hidden)] pub use futures_macro::stream_select_internal; +#[allow(clippy::too_long_first_doc_paragraph)] /// Combines several streams, all producing the same `Item` type, into one stream. /// This is similar to `select_all` but does not require the streams to all be the same type. /// It also keeps the streams inline, and does not require `Box`s to be allocated. diff --git a/futures-util/src/stream/select_with_strategy.rs b/futures-util/src/stream/select_with_strategy.rs index 3be933e901..4375f3e259 100644 --- a/futures-util/src/stream/select_with_strategy.rs +++ b/futures-util/src/stream/select_with_strategy.rs @@ -75,6 +75,7 @@ pin_project! { } } +#[allow(clippy::too_long_first_doc_paragraph)] /// This function will attempt to pull items from both streams. You provide a /// closure to tell [`SelectWithStrategy`] which stream to poll. The closure can /// store state on `SelectWithStrategy` to which it will receive a `&mut` on every