That's a use-case for thread::scope, which does the same thing your program is doing, but has the type signatures that allow you to capture non-'static data.
2 Likes
That's a use-case for thread::scope, which does the same thing your program is doing, but has the type signatures that allow you to capture non-'static data.