mirror of
https://github.com/async-rs/async-std.git
synced 2025-02-06 04:35:32 +00:00
Remove unnecessary Unpin bounds
This commit is contained in:
parent
50a7db2af4
commit
91e61cf6bf
1 changed files with 4 additions and 3 deletions
|
@ -9,7 +9,7 @@ pub struct Scan<S, St, F> {
|
||||||
state_f: (St, F),
|
state_f: (St, F),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S, St: Unpin, F: Unpin> Scan<S, St, F> {
|
impl<S, St, F> Scan<S, St, F> {
|
||||||
pub(crate) fn new(stream: S, initial_state: St, f: F) -> Self {
|
pub(crate) fn new(stream: S, initial_state: St, f: F) -> Self {
|
||||||
Self {
|
Self {
|
||||||
stream,
|
stream,
|
||||||
|
@ -21,11 +21,12 @@ impl<S, St: Unpin, F: Unpin> Scan<S, St, F> {
|
||||||
pin_utils::unsafe_unpinned!(state_f: (St, F));
|
pin_utils::unsafe_unpinned!(state_f: (St, F));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<S: Unpin, St, F> Unpin for Scan<S, St, F> {}
|
||||||
|
|
||||||
impl<S, St, F, B> futures_core::stream::Stream for Scan<S, St, F>
|
impl<S, St, F, B> futures_core::stream::Stream for Scan<S, St, F>
|
||||||
where
|
where
|
||||||
S: futures_core::stream::Stream,
|
S: futures_core::stream::Stream,
|
||||||
St: Unpin,
|
F: FnMut(&mut St, S::Item) -> Option<B>,
|
||||||
F: Unpin + FnMut(&mut St, S::Item) -> Option<B>,
|
|
||||||
{
|
{
|
||||||
type Item = B;
|
type Item = B;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue