mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
add #[must_use] to more futures and streams (#1309)
This commit is contained in:
@@ -24,6 +24,7 @@ where
|
||||
|
||||
/// Future returned by `read_dir`.
|
||||
#[derive(Debug)]
|
||||
#[must_use = "futures do nothing unless you `.await` or poll them"]
|
||||
pub struct ReadDirFuture<P>
|
||||
where
|
||||
P: AsRef<Path> + Send + 'static,
|
||||
@@ -68,6 +69,7 @@ where
|
||||
/// [`Stream`]: ../futures/stream/trait.Stream.html
|
||||
/// [`Err`]: https://doc.rust-lang.org/std/result/enum.Result.html#variant.Err
|
||||
#[derive(Debug)]
|
||||
#[must_use = "streams do nothing unless polled"]
|
||||
pub struct ReadDir(StdReadDir);
|
||||
|
||||
impl Stream for ReadDir {
|
||||
|
||||
Reference in New Issue
Block a user