Merge use.

This commit is contained in:
Stephen Chung
2022-04-13 10:35:10 +08:00
parent c5015d5e86
commit 7788e1058a
10 changed files with 32 additions and 43 deletions

View File

@@ -8,6 +8,7 @@ use std::{
fmt,
hash::Hash,
ops::{Add, AddAssign},
ptr,
};
/// Compiled AST (abstract syntax tree) of a Rhai script.
@@ -870,8 +871,8 @@ impl PartialEq for ASTNode<'_> {
#[inline(always)]
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(Self::Stmt(x), Self::Stmt(y)) => std::ptr::eq(*x, *y),
(Self::Expr(x), Self::Expr(y)) => std::ptr::eq(*x, *y),
(Self::Stmt(x), Self::Stmt(y)) => ptr::eq(*x, *y),
(Self::Expr(x), Self::Expr(y)) => ptr::eq(*x, *y),
_ => false,
}
}