News for hackers. Stuff that matters.
Re:The Size of Rust Futures by pornel on Saturday January 28, 2023 @08:30AM (#34557424)
Yup, I've ran into this when my entire program ended up being a single massive Future struct, which caused a stack overflow :)

I wish there was a Clippy lint for this (https://github.com/rust-lang/rust-clippy/issues/5263).

My current practice is to sprinkle `Box::pin` on code paths that are less common (fallbacks, error handling) or expensive anyway. This cuts down the inlined state considerably without actually causing that many allocations.

There are no comments on this comment yet.