Taiki Endo
Taiki Endo
Oh, sorry, I misunderstood that I could implement foreign traits for tuples.
Ok, I think we can support this based on the rules like the following: * Traits are defined in the standard library and not implemented for tuples. * All branches...
Does this seem implemented as [clippy::ptr_as_ptr](https://rust-lang.github.io/rust-clippy/master/index.html#ptr_as_ptr)?
```rust fn async_std_spawn(future: Pin) { async_std::task::spawn(future); } ``` ```rust fn tokio_spawn(future: Pin) { tokio::spawn(future); } ``` Note that both are not enough. Both `tokio::spawn` and `async_std::task::spawn` return handle, always ignoring...
Also, this seems to only works on global runtime. (and probably only if it is one) I think there are various other problems. There are some projects that are trying...
Probably you need to enable the `tokio02` feature of `async-std`.
> So we currently don't have `map`, but [`futures::Stream::map`](https://docs.rs/futures-preview/0.3.0-alpha.19/futures/stream/trait.StreamExt.html#method.map) is defined as: Many combinators of `futures_util::stream` other than Map use `FnMut(T) -> impl Future` closures. https://docs.rs/futures-preview/0.3.0-alpha.19/futures/stream/trait.StreamExt.html#method.filter_map
@stjepang Maybe it ’s an oversight. I will file an issue. UPDATE: filed https://github.com/rust-lang-nursery/futures-rs/issues/1889.
@montekki You need to use `pin_utils::pin_mut` (or `Box::pin`) (`Pin` always implements Unpin.) ```rust let s = stream::iter(1u8..10); let s = s.filter_map(|a| async move { Some(a) }); pin_utils::pin_mut!(s); while let Some(n)...
`next` takes `&mut self` for ergonomics. If this is `Pin`, you need to call `.as_mut()` every time. (With the current design, even if Self is `!Unpin`, you pin it once...