The comment explaining avoidingStateMachineCoW() states:
/// Sadly, because it's generic and has a closure, we need to force it to be inlined
/// at all call sites, which is not ideal.
However, at all but one call site, it always returns the same type, so it doesn't really need to be generic and we can avoid the "not ideal" inlining requirement.
The comment explaining
avoidingStateMachineCoW()
states:However, at all but one call site, it always returns the same type, so it doesn't really need to be generic and we can avoid the "not ideal" inlining requirement.