Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra boxing around Unpin requirement and fix fused future usage #2310

Merged
merged 3 commits into from
Dec 11, 2023

Conversation

nazar-pc
Copy link
Member

I was removing extra boxing and noticed incorrect fused future usage in gossip code.

Fused futures are futures that have .terminated() method on them for the purposes of not being called again in select! (for example).

By calling .fuse() in a loop it does literally nothing since termination status is not preserved across loop iterations. Futures and streams should be fused before entering the loop. Not all uses were incorrect, but the issue was still there.

Code contributor checklist:

@nazar-pc nazar-pc enabled auto-merge December 11, 2023 09:46
@nazar-pc nazar-pc changed the title Remove extra boxing around Unpin requirement and fixed fused future usage Remove extra boxing around Unpin requirement and fix fused future usage Dec 11, 2023
@nazar-pc nazar-pc force-pushed the remove-extra-boxing branch from 4a70e2d to 8440b5e Compare December 11, 2023 09:58
NingLin-P
NingLin-P previously approved these changes Dec 11, 2023
# Conflicts:
#	crates/subspace-farmer/src/bin/subspace-farmer/commands/farm.rs
@nazar-pc nazar-pc added this pull request to the merge queue Dec 11, 2023
Merged via the queue into main with commit e36e0fd Dec 11, 2023
10 checks passed
@nazar-pc nazar-pc deleted the remove-extra-boxing branch December 11, 2023 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants