diff options
author | Alex Orlenko <zxteam@protonmail.com> | 2020-01-06 23:59:50 +0000 |
---|---|---|
committer | Alex Orlenko <zxteam@protonmail.com> | 2020-01-07 00:03:03 +0000 |
commit | 5eec0ef56ba710e8bcd2e4f32ade865c7b2d23d6 (patch) | |
tree | 7eff34c340e9dbfd49ef3acb6f3a36348b72a3f3 /src/thread.rs | |
parent | 831161bfda4fb5bfea306e8ebec6db508a0884c8 (diff) | |
download | mlua-5eec0ef56ba710e8bcd2e4f32ade865c7b2d23d6.zip |
Implement PartialEq trait for Value (and subtypes)
Add equals() method to compare values optionally invoking __eq.
Diffstat (limited to 'src/thread.rs')
-rw-r--r-- | src/thread.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/thread.rs b/src/thread.rs index 97b0362..2452fec 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -143,3 +143,9 @@ impl<'lua> Thread<'lua> { } } } + +impl<'lua> PartialEq for Thread<'lua> { + fn eq(&self, other: &Self) -> bool { + self.0 == other.0 + } +} |