From 6708cef2a4e4e3a513fb212cdff60c16edfe5931 Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Tue, 2 Jun 2020 15:17:14 -0500 Subject: [PATCH 1/2] Fix compilation on redox --- src/compile.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compile.rs b/src/compile.rs index b2273bf..b7e2f0a 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -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(), )) From f7216a144ad3a8eed5387ce6fbf8976f4c22a532 Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Sat, 6 Jun 2020 15:37:47 -0500 Subject: [PATCH 2/2] Fix Rust 1.44 clippy warnings --- src/compile.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compile.rs b/src/compile.rs index b7e2f0a..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)?;