You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This certainly used to be something that wasn't allowed back in the stack-scanning days because the vector elements weren't on the stack. Is this now valid with the new design for Root, or should we lint more strongly for this and rewrite the code?
Activity
nox commentedon Nov 29, 2015
This can probably return a RootedVec through
RootedVec::with_destination_address.jdm commentedon Nov 29, 2015
If this turns out to be unsafe, we need to update the bindings generation to disallow
sequence<Interface>return types until we have a solution.nox commentedon Nov 29, 2015
Err no it can't. We could pass a
&mut RootedVec. Using Root here seems to be safe, but not very efficient, I guess.dzbarsky commentedon Nov 29, 2015
That code should probably return an iterator instead of calling collect, but I didn't know how to make the lifetimes compile when I wrote it.
michaelwu commentedon Nov 30, 2015
An iterator seems more appropriate here, for performance/memory reasons.
jdm commentedon Apr 22, 2016
The code isn't unsafe, so this is fine.