Use .. for (_).
This commit is contained in:
@@ -724,7 +724,9 @@ impl Engine {
|
||||
|
||||
match expr {
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
Expr::FnCall(x, ..) if _parent_chain_type == ChainType::Dotting && !x.is_qualified() => {
|
||||
Expr::FnCall(x, ..)
|
||||
if _parent_chain_type == ChainType::Dotting && !x.is_qualified() =>
|
||||
{
|
||||
let crate::ast::FnCallExpr {
|
||||
args, constants, ..
|
||||
} = x.as_ref();
|
||||
|
@@ -465,16 +465,16 @@ impl Engine {
|
||||
|
||||
// Skip transitive nodes
|
||||
match node {
|
||||
ASTNode::Expr(Expr::Stmt(_)) | ASTNode::Stmt(Stmt::Expr(_)) => return Ok(None),
|
||||
ASTNode::Expr(Expr::Stmt(..)) | ASTNode::Stmt(Stmt::Expr(..)) => return Ok(None),
|
||||
_ => (),
|
||||
}
|
||||
|
||||
let stop = match global.debugger.status {
|
||||
DebuggerStatus::Next(false, false) => false,
|
||||
DebuggerStatus::Next(true, false) => matches!(node, ASTNode::Stmt(_)),
|
||||
DebuggerStatus::Next(false, true) => matches!(node, ASTNode::Expr(_)),
|
||||
DebuggerStatus::Next(true, false) => matches!(node, ASTNode::Stmt(..)),
|
||||
DebuggerStatus::Next(false, true) => matches!(node, ASTNode::Expr(..)),
|
||||
DebuggerStatus::Next(true, true) => true,
|
||||
DebuggerStatus::FunctionExit(_) => false,
|
||||
DebuggerStatus::FunctionExit(..) => false,
|
||||
};
|
||||
|
||||
let event = if stop {
|
||||
|
@@ -324,7 +324,7 @@ impl Engine {
|
||||
Expr::StringConstant(x, ..) => Ok(x.clone().into()),
|
||||
Expr::CharConstant(x, ..) => Ok((*x).into()),
|
||||
Expr::BoolConstant(x, ..) => Ok((*x).into()),
|
||||
Expr::Unit(_) => Ok(Dynamic::UNIT),
|
||||
Expr::Unit(..) => Ok(Dynamic::UNIT),
|
||||
|
||||
// `... ${...} ...`
|
||||
Expr::InterpolatedString(x, pos) => {
|
||||
|
@@ -323,7 +323,7 @@ impl Engine {
|
||||
|
||||
let result = match stmt {
|
||||
// No-op
|
||||
Stmt::Noop(_) => Ok(Dynamic::UNIT),
|
||||
Stmt::Noop(..) => Ok(Dynamic::UNIT),
|
||||
|
||||
// Expression as statement
|
||||
Stmt::Expr(expr) => self
|
||||
@@ -483,7 +483,7 @@ impl Engine {
|
||||
}
|
||||
|
||||
// Loop
|
||||
Stmt::While(Expr::Unit(_), body, ..) => loop {
|
||||
Stmt::While(Expr::Unit(..), body, ..) => loop {
|
||||
if !body.is_empty() {
|
||||
match self
|
||||
.eval_stmt_block(scope, global, state, lib, this_ptr, body, true, level)
|
||||
|
@@ -144,10 +144,10 @@ impl<'a> Target<'a> {
|
||||
#[must_use]
|
||||
pub const fn is_ref(&self) -> bool {
|
||||
match self {
|
||||
Self::RefMut(_) => true,
|
||||
Self::RefMut(..) => true,
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
Self::SharedValue { .. } => true,
|
||||
Self::TempValue(_) => false,
|
||||
Self::TempValue(..) => false,
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
Self::Bit { .. }
|
||||
| Self::BitField { .. }
|
||||
@@ -160,10 +160,10 @@ impl<'a> Target<'a> {
|
||||
#[must_use]
|
||||
pub const fn is_temp_value(&self) -> bool {
|
||||
match self {
|
||||
Self::RefMut(_) => false,
|
||||
Self::RefMut(..) => false,
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
Self::SharedValue { .. } => false,
|
||||
Self::TempValue(_) => true,
|
||||
Self::TempValue(..) => true,
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
Self::Bit { .. }
|
||||
| Self::BitField { .. }
|
||||
@@ -275,7 +275,7 @@ impl<'a> Target<'a> {
|
||||
#[inline]
|
||||
pub fn propagate_changed_value(&mut self) -> RhaiResultOf<()> {
|
||||
match self {
|
||||
Self::RefMut(_) | Self::TempValue(_) => (),
|
||||
Self::RefMut(..) | Self::TempValue(..) => (),
|
||||
#[cfg(not(feature = "no_closure"))]
|
||||
Self::SharedValue { .. } => (),
|
||||
#[cfg(not(feature = "no_index"))]
|
||||
|
Reference in New Issue
Block a user