I have some closures stored in a hash map. They get the same param (a vector). In certain cases I’d like to switch my concrete vector, so that every closure get the same new vector when they are called. Can someone help me with that?
My example is here (a Rust port of The Super Tiny Compiler). I set my vector here initially and would like to use a new vector here. This doesn’t work because
arguments does not live long enough. But I’m not sure how to fix this. I tried to box my vector somehow, so that the box is always the same and I only change its value. But it doesn’t seem to work.