Skip to content

Commit f4ab24e

Browse files
committed
fix: fix multicast stream boxing
1 parent 7d5cc70 commit f4ab24e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/multicast.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use std::{pin::Pin, task::Poll};
1616

17-
use futures_util::Stream;
17+
use futures_util::{Stream, stream::BoxStream};
1818
use pin_project_lite::pin_project;
1919
use thiserror::Error;
2020

@@ -38,7 +38,7 @@ pin_project! {
3838
#[project = VariantStreamProject]
3939
enum VariantStream<'a> {
4040
Twitch { #[pin] x: crate::twitch::Chat },
41-
YouTube { #[pin] x: Pin<Box<dyn Stream<Item = Result<youtube::Action, youtube::Error>> + 'a>> }
41+
YouTube { #[pin] x: BoxStream<'a, Result<youtube::Action, youtube::Error>> }
4242
}
4343
}
4444

@@ -63,8 +63,8 @@ impl<'a> From<crate::twitch::Chat> for VariantStream<'a> {
6363
}
6464
}
6565

66-
impl<'a> From<Pin<Box<dyn Stream<Item = Result<youtube::Action, youtube::Error>> + 'a>>> for VariantStream<'a> {
67-
fn from(value: Pin<Box<dyn Stream<Item = Result<youtube::Action, youtube::Error>> + 'a>>) -> Self {
66+
impl<'a> From<BoxStream<'a, Result<youtube::Action, youtube::Error>>> for VariantStream<'a> {
67+
fn from(value: BoxStream<'a, Result<youtube::Action, youtube::Error>>) -> Self {
6868
Self::YouTube { x: value }
6969
}
7070
}

0 commit comments

Comments
 (0)