diff options
Diffstat (limited to 'src/thread.rs')
-rw-r--r-- | src/thread.rs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/thread.rs b/src/thread.rs index 4e5bd9e..dfce272 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -3,7 +3,7 @@ use std::os::raw::c_int; use crate::error::{Error, Result}; use crate::ffi; -use crate::types::{LuaOwnedRef, LuaRef}; +use crate::types::LuaRef; use crate::util::{check_stack, error_traceback_thread, pop_error, StackGuard}; use crate::value::{FromLuaMulti, ToLuaMulti}; @@ -47,17 +47,6 @@ pub enum ThreadStatus { #[derive(Clone, Debug)] pub struct Thread<'lua>(pub(crate) LuaRef<'lua>); -/// Owned handle to an internal Lua thread. -#[derive(Clone, Debug)] -pub struct OwnedThread(pub(crate) LuaOwnedRef); - -impl OwnedThread { - /// Get borrowed handle to the underlying Lua thread. - pub const fn to_ref(&self) -> Thread { - Thread(self.0.to_ref()) - } -} - /// Thread (coroutine) representation as an async [`Future`] or [`Stream`]. /// /// Requires `feature = "async"` @@ -346,12 +335,6 @@ impl<'lua> Thread<'lua> { protect_lua!(state, 0, 0, |_| ffi::luaL_sandboxthread(thread)) } } - - /// Convert this handle to owned version. - #[inline] - pub fn into_owned(self) -> OwnedThread { - OwnedThread(self.0.into_owned()) - } } impl<'lua> PartialEq for Thread<'lua> { |