File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1919 {
2020 let stream = stream. into_stream ( ) ;
2121
22- Pin :: from ( Box :: new ( async move {
22+ Box :: pin ( async move {
2323 pin_utils:: pin_mut!( stream) ;
2424
2525 // Using `scan` here because it is able to stop the stream early
4444 } else {
4545 Some ( out)
4646 }
47- } ) )
47+ } )
4848 }
4949}
Original file line number Diff line number Diff line change 1919 {
2020 let stream = stream. into_stream ( ) ;
2121
22- Pin :: from ( Box :: new ( async move {
22+ Box :: pin ( async move {
2323 pin_utils:: pin_mut!( stream) ;
2424
2525 // Using `scan` here because it is able to stop the stream early
4343 Some ( err) => Err ( err) ,
4444 None => Ok ( out) ,
4545 }
46- } ) )
46+ } )
4747 }
4848}
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ impl<T> FromStream<T> for Vec<T> {
1212 {
1313 let stream = stream. into_stream ( ) ;
1414
15- Pin :: from ( Box :: new ( async move {
15+ Box :: pin ( async move {
1616 pin_utils:: pin_mut!( stream) ;
1717
1818 let mut out = vec ! [ ] ;
1919 out. stream_extend ( stream) . await ;
2020 out
21- } ) )
21+ } )
2222 }
2323}
You can’t perform that action at this time.
0 commit comments