StoicDeveloper

Results 20 comments of StoicDeveloper

I went ahead and wrote a library based on FuturesUnordered that does exactly this: https://github.com/StoicDeveloper/mapped_futures. I aim to publish it as a crate once I have some feedback.

Here is the crate that covers this issue: https://crates.io/crates/mapped_futures

> @StoicDeveloper what was the motivation for making a separate crate instead of opening a PR, here? @allsey87 Honestly, it had not occurred to me to do so. I haven't...

I'm having this same issue. The assist deletes about 30 lines of code inside the macro. Before using code action: ![beforeFillMatchArms](https://github.com/rust-lang/rust-analyzer/assets/43722761/1bd8d995-fc84-4efc-9aca-32f616f8a928) After using code action: ![afterFillMatchArms](https://github.com/rust-lang/rust-analyzer/assets/43722761/4eabcc2d-1e8a-4f1b-8588-6329c1c9fcd2)

I'm also considering further additions for more complex data structure support, such as: - MultiMapFutures which allows a key to index for one or more futures - BiMapFutures which allows...

> Thanks for the PR! It looks like a lot of the code added here is a copy from FutureUnordered. Is it possible to replace some of them with re-exports...

@taiki-e I've implemented a new module futures_keyed which contains most of the code that was in futures_unordered. futures_unordered and mapped_futures now consume the API of futures_keyed. There is more work...

@taiki-e I've addressed your comments and some merge conflicts resulting from work over the past few months. Let me know if there's anything else; I should be able to address...

Also, the crate I published evidently has unsound code that causes this bug in tokio: https://github.com/StoicDeveloper/mapped_futures/issues/4 That issue will obviously have to be resolved here before this PR can proceed....

I found unsoundness by running this PR's tests through miri. The unsoundness comes from the potential for a dropped task to still have a pointer in the ReadyToRunQueue, which will...