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
Right now, Thread::into_async is not really usable because it returns a AsyncThread<impl IntoLuaMulti, R> where the impl IntoLuaMulti is the same as A:
Instead, this should probably use a second type parameter of A in into_async to allow for rust to correctly infer the type using the passed value for args like so:
Right now, Thread::into_async is not really usable
Could you provide more details/example please?
The issue right now is that the returned AsyncThread is a AsyncThread<impl IntoLuaMulti, R> which cannot be (easily) put in a struct. So the below is not possible:
pubstructA{a:AsyncThread<LuaMultiValue,LuaMultiValue>}A{a: thread.into_async::<LuaMultiValue>(args)}// Assume args is a LuaMultiValue for sake of brevity
Due to the lack of genericizing on args, rust does not realise that the A of AsyncThread is actually a LuaMultiValue (from args) leading to a value that cannot be (easily) put into a struct and can basically only exist as a variable.
I probably better remove A completely and instead push args to the thread.
Right now, Thread::into_async is not really usable because it returns a AsyncThread<impl IntoLuaMulti, R> where the impl IntoLuaMulti is the same as A:
Instead, this should probably use a second type parameter of A in into_async to allow for rust to correctly infer the type using the passed value for
args
like so:The text was updated successfully, but these errors were encountered: