diff --git a/src/compile.rs b/src/compile.rs index b2273bf..7303e43 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -591,7 +591,7 @@ impl Compiler { { return Err(self.error_loc( CompileErrorType::AsyncReturnValue, - statement.location.clone(), + statement.location, )); } self.compile_expression(v)?; @@ -2042,7 +2042,7 @@ impl Compiler { let mut compile_element = |element| { self.compile_expression(element).map_err(|e| { - if matches!(e.error, CompileErrorType::InvalidStarExpr) { + if let CompileErrorType::InvalidStarExpr = e.error { self.error(CompileErrorType::SyntaxError( "iterable unpacking cannot be used in comprehension".to_owned(), ))