Skip to content

Commit

Permalink
quinn: Remove obsolete must_use for futures
Browse files Browse the repository at this point in the history
  • Loading branch information
gretchenfrage authored and Ralith committed Dec 15, 2024
1 parent db4c0e4 commit 8ab077d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions quinn/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use proto::{

/// In-progress connection attempt future
#[derive(Debug)]
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
pub struct Connecting {
conn: Option<ConnectionRef>,
connected: oneshot::Receiver<bool>,
Expand Down Expand Up @@ -212,7 +211,6 @@ impl Future for Connecting {
///
/// For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
/// value is meaningless.
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
pub struct ZeroRttAccepted(oneshot::Receiver<bool>);

impl Future for ZeroRttAccepted {
Expand Down
5 changes: 0 additions & 5 deletions quinn/src/recv_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ impl<T> From<(Option<T>, Option<proto::ReadError>)> for ReadStatus<T> {
/// Future produced by [`RecvStream::read_to_end()`].
///
/// [`RecvStream::read_to_end()`]: crate::RecvStream::read_to_end
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct ReadToEnd<'a> {
stream: &'a mut RecvStream,
read: Vec<(Bytes, u64)>,
Expand Down Expand Up @@ -597,7 +596,6 @@ impl From<ResetError> for io::Error {
/// Future produced by [`RecvStream::read()`].
///
/// [`RecvStream::read()`]: crate::RecvStream::read
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct Read<'a> {
stream: &'a mut RecvStream,
buf: ReadBuf<'a>,
Expand All @@ -619,7 +617,6 @@ impl Future for Read<'_> {
/// Future produced by [`RecvStream::read_exact()`].
///
/// [`RecvStream::read_exact()`]: crate::RecvStream::read_exact
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct ReadExact<'a> {
stream: &'a mut RecvStream,
buf: ReadBuf<'a>,
Expand Down Expand Up @@ -656,7 +653,6 @@ pub enum ReadExactError {
/// Future produced by [`RecvStream::read_chunk()`].
///
/// [`RecvStream::read_chunk()`]: crate::RecvStream::read_chunk
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct ReadChunk<'a> {
stream: &'a mut RecvStream,
max_length: usize,
Expand All @@ -674,7 +670,6 @@ impl Future for ReadChunk<'_> {
/// Future produced by [`RecvStream::read_chunks()`].
///
/// [`RecvStream::read_chunks()`]: crate::RecvStream::read_chunks
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct ReadChunks<'a> {
stream: &'a mut RecvStream,
bufs: &'a mut [Bytes],
Expand Down
6 changes: 0 additions & 6 deletions quinn/src/send_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ impl Drop for SendStream {
}

/// Future produced by `SendStream::stopped`
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct Stopped<'a> {
stream: &'a mut SendStream,
}
Expand All @@ -321,7 +320,6 @@ impl Future for Stopped<'_> {
/// Future produced by [`SendStream::write()`].
///
/// [`SendStream::write()`]: crate::SendStream::write
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct Write<'a> {
stream: &'a mut SendStream,
buf: &'a [u8],
Expand All @@ -339,7 +337,6 @@ impl Future for Write<'_> {
/// Future produced by [`SendStream::write_all()`].
///
/// [`SendStream::write_all()`]: crate::SendStream::write_all
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct WriteAll<'a> {
stream: &'a mut SendStream,
buf: &'a [u8],
Expand All @@ -363,7 +360,6 @@ impl Future for WriteAll<'_> {
/// Future produced by [`SendStream::write_chunks()`].
///
/// [`SendStream::write_chunks()`]: crate::SendStream::write_chunks
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct WriteChunks<'a> {
stream: &'a mut SendStream,
bufs: &'a mut [Bytes],
Expand All @@ -381,7 +377,6 @@ impl Future for WriteChunks<'_> {
/// Future produced by [`SendStream::write_chunk()`].
///
/// [`SendStream::write_chunk()`]: crate::SendStream::write_chunk
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct WriteChunk<'a> {
stream: &'a mut SendStream,
buf: [Bytes; 1],
Expand All @@ -404,7 +399,6 @@ impl Future for WriteChunk<'_> {
/// Future produced by [`SendStream::write_all_chunks()`].
///
/// [`SendStream::write_all_chunks()`]: crate::SendStream::write_all_chunks
#[must_use = "futures/streams/sinks do nothing unless you `.await` or poll them"]
struct WriteAllChunks<'a> {
stream: &'a mut SendStream,
bufs: &'a mut [Bytes],
Expand Down

0 comments on commit 8ab077d

Please sign in to comment.