Use .. for (_).
This commit is contained in:
@@ -48,7 +48,7 @@ fn test_closures() -> Result<(), Box<EvalAltResult>> {
|
||||
.compile_expression("let f = |x| {};")
|
||||
.expect_err("should error")
|
||||
.0,
|
||||
ParseErrorType::BadInput(_)
|
||||
ParseErrorType::BadInput(..)
|
||||
));
|
||||
|
||||
assert_eq!(
|
||||
|
@@ -74,7 +74,7 @@ fn test_fn_ptr() -> Result<(), Box<EvalAltResult>> {
|
||||
)
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorInFunctionCall(fn_name, _, err, ..)
|
||||
if fn_name == "foo" && matches!(*err, EvalAltResult::ErrorUnboundThis(_))
|
||||
if fn_name == "foo" && matches!(*err, EvalAltResult::ErrorUnboundThis(..))
|
||||
));
|
||||
|
||||
Ok(())
|
||||
|
@@ -249,7 +249,7 @@ fn test_internal_fn_bang() -> Result<(), Box<EvalAltResult>> {
|
||||
)
|
||||
.expect_err("should error")
|
||||
.0,
|
||||
ParseErrorType::MalformedCapture(_)
|
||||
ParseErrorType::MalformedCapture(..)
|
||||
));
|
||||
|
||||
Ok(())
|
||||
|
@@ -214,7 +214,7 @@ fn test_module_resolver() -> Result<(), Box<EvalAltResult>> {
|
||||
"#
|
||||
)
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorTooManyModules(_)
|
||||
EvalAltResult::ErrorTooManyModules(..)
|
||||
));
|
||||
|
||||
#[cfg(not(feature = "no_function"))]
|
||||
|
@@ -19,7 +19,7 @@ fn test_max_operations() -> Result<(), Box<EvalAltResult>> {
|
||||
|
||||
assert!(matches!(
|
||||
*engine.run("for x in 0..500 {}").expect_err("should error"),
|
||||
EvalAltResult::ErrorTooManyOperations(_)
|
||||
EvalAltResult::ErrorTooManyOperations(..)
|
||||
));
|
||||
|
||||
engine.set_max_operations(0);
|
||||
@@ -44,7 +44,7 @@ fn test_max_operations_literal() -> Result<(), Box<EvalAltResult>> {
|
||||
*engine
|
||||
.run("[1, 2, 3, 4, 5, 6, 7, 8, 9]")
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorTooManyOperations(_)
|
||||
EvalAltResult::ErrorTooManyOperations(..)
|
||||
));
|
||||
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
@@ -55,7 +55,7 @@ fn test_max_operations_literal() -> Result<(), Box<EvalAltResult>> {
|
||||
*engine
|
||||
.run("#{a:1, b:2, c:3, d:4, e:5, f:6, g:7, h:8, i:9}")
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorTooManyOperations(_)
|
||||
EvalAltResult::ErrorTooManyOperations(..)
|
||||
));
|
||||
|
||||
Ok(())
|
||||
@@ -111,7 +111,7 @@ fn test_max_operations_functions() -> Result<(), Box<EvalAltResult>> {
|
||||
"#,
|
||||
)
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorTooManyOperations(_)
|
||||
EvalAltResult::ErrorTooManyOperations(..)
|
||||
));
|
||||
|
||||
Ok(())
|
||||
@@ -138,7 +138,7 @@ fn test_max_operations_eval() -> Result<(), Box<EvalAltResult>> {
|
||||
"#
|
||||
)
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorInFunctionCall(.., err, _) if matches!(*err, EvalAltResult::ErrorTooManyOperations(_))
|
||||
EvalAltResult::ErrorInFunctionCall(.., err, _) if matches!(*err, EvalAltResult::ErrorTooManyOperations(..))
|
||||
));
|
||||
|
||||
Ok(())
|
||||
|
@@ -29,7 +29,7 @@ fn test_stack_overflow_fn_calls() -> Result<(), Box<EvalAltResult>> {
|
||||
max + 1
|
||||
))
|
||||
.expect_err("should error"),
|
||||
EvalAltResult::ErrorStackOverflow(_)
|
||||
EvalAltResult::ErrorStackOverflow(..)
|
||||
));
|
||||
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user