Skip to content

Commit efd0856

Browse files
committed
Derive PartialEq for Thread
1 parent c910660 commit efd0856

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/thread.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl ThreadStatusInner {
106106
}
107107

108108
/// Handle to an internal Lua thread (coroutine).
109-
#[derive(Clone)]
109+
#[derive(Clone, PartialEq)]
110110
pub struct Thread(pub(crate) ValueRef, pub(crate) *mut ffi::lua_State);
111111

112112
#[cfg(feature = "send")]
@@ -565,12 +565,6 @@ impl fmt::Debug for Thread {
565565
}
566566
}
567567

568-
impl PartialEq for Thread {
569-
fn eq(&self, other: &Self) -> bool {
570-
self.0 == other.0
571-
}
572-
}
573-
574568
impl LuaType for Thread {
575569
const TYPE_ID: c_int = ffi::LUA_TTHREAD;
576570
}

0 commit comments

Comments
 (0)