tokio-stream: implement FusedStream for Fuse (#8090)

This commit is contained in:
stormshield-fabs
2026-04-28 17:33:54 +02:00
committed by GitHub
parent dc0f728162
commit 47cc31590f
2 changed files with 17 additions and 0 deletions
+10
View File
@@ -1,5 +1,6 @@
use crate::Stream;
use futures_core::FusedStream;
use pin_project_lite::pin_project;
use std::pin::Pin;
use std::task::{ready, Context, Poll};
@@ -51,3 +52,12 @@ where
}
}
}
impl<T> FusedStream for Fuse<T>
where
T: Stream,
{
fn is_terminated(&self) -> bool {
self.stream.is_none()
}
}