Closed
Description
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:
pub fn into_async<R>(self, args: impl IntoLuaMulti) -> AsyncThread<impl IntoLuaMulti, R>
where
R: FromLuaMulti,
{
AsyncThread {
thread: self,
init_args: Some(args),
ret: PhantomData,
recycle: false,
}
}
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:
pub fn into_async<A, R>(self, args: A) -> AsyncThread<A, R>
where
A: IntoLuaMulti
R: FromLuaMulti,
{
AsyncThread {
thread: self,
init_args: Some(args),
ret: PhantomData,
recycle: false,
}
}
Metadata
Metadata
Assignees
Labels
No labels