From a34951dc1b0c01b183cadb92ae40a4717c8d81dc Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Wed, 6 May 2020 21:33:25 -0500 Subject: [PATCH] Fix clippy and unittest error --- parser/src/lexer.rs | 2 +- src/shell.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/src/lexer.rs b/parser/src/lexer.rs index 10fb778533..eda96ea741 100644 --- a/parser/src/lexer.rs +++ b/parser/src/lexer.rs @@ -1625,7 +1625,7 @@ mod tests { is_fstring: false, }, Tok::String { - value: String::from("raw\'"), + value: String::from("raw\\'"), is_fstring: false, }, Tok::String { diff --git a/src/shell.rs b/src/shell.rs index dafe3aaecb..4a6c095e61 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -19,7 +19,7 @@ enum ShellExecResult { fn shell_exec(vm: &VirtualMachine, source: &str, scope: Scope) -> ShellExecResult { match vm.compile(source, compile::Mode::Single, "".to_owned()) { - Ok(code) => match vm.run_code_obj(code, scope.clone()) { + Ok(code) => match vm.run_code_obj(code, scope) { Ok(_val) => ShellExecResult::Ok, Err(err) => ShellExecResult::PyErr(err), },