Skip to content

Commit

Permalink
Finalize PR#3299
Browse files Browse the repository at this point in the history
  • Loading branch information
Ploppz committed Dec 14, 2023
1 parent 9a24fff commit dc6c4c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use crate::future::pagination_stream::collect::sealed::Collectable;
use std::future::Future;
use std::pin::{pin, Pin};
use std::pin::Pin;
use std::task::{Context, Poll};

pub mod collect;
Expand Down
4 changes: 2 additions & 2 deletions rust-runtime/aws-smithy-types-convert/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
#[cfg(any(feature = "convert-time", feature = "convert-chrono"))]
pub mod date_time;

#[cfg(feature = "convert-futures")]
pub mod futures;
#[cfg(feature = "convert-streams")]
pub mod stream;
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,17 @@ where
self.pagination_stream.poll_next(cx)
}
}

/// Trait to convert PaginationStream into implementor of `Stream`
pub trait PaginationStreamExt<Item> {
/// Convert PaginationStream into implementor of `Stream`
fn as_stream_01x(self) -> PaginationStreamImplStream<Item>;
}

impl<Item> PaginationStreamExt<Item> for PaginationStream<Item> {
fn as_stream_01x(self) -> PaginationStreamImplStream<Item> {
PaginationStreamImplStream {
pagination_stream: self,
}
}
}

0 comments on commit dc6c4c9

Please sign in to comment.