3 ms·
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 f
by pornel 4y ago
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 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.