diff options
author | Alex Orlenko <zxteam@protonmail.com> | 2021-05-03 13:11:59 +0100 |
---|---|---|
committer | Alex Orlenko <zxteam@protonmail.com> | 2021-05-03 13:11:59 +0100 |
commit | 585c0a25d81040b3697d957ef851179bc788d48b (patch) | |
tree | d3d969f775fad9943c5b170d70c44028f7331097 /src | |
parent | 64346ce56cd29add150fe96872ee1dc56d532f99 (diff) | |
download | mlua-585c0a25d81040b3697d957ef851179bc788d48b.zip |
Replace 'Thread already finished' error with common `Error::CoroutineInactive`
Diffstat (limited to 'src')
-rw-r--r-- | src/thread.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/thread.rs b/src/thread.rs index 96c932f..1da71ed 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -10,7 +10,6 @@ use crate::value::{FromLuaMulti, MultiValue, ToLuaMulti}; #[cfg(feature = "async")] use { crate::{ - error::ExternalError, lua::{ASYNC_POLL_PENDING, WAKER_REGISTRY_KEY}, util::get_gc_userdata, value::Value, @@ -277,7 +276,7 @@ where match self.thread.status() { ThreadStatus::Resumable => {} - _ => return Poll::Ready(Err("Thread already finished".to_lua_err())), + _ => return Poll::Ready(Err(Error::CoroutineInactive)), }; let _wg = WakerGuard::new(lua.state, cx.waker().clone()); |