From b34784e9efdcdc1449299a67f84cc3b07634b156 Mon Sep 17 00:00:00 2001 From: Windel Bouwman Date: Wed, 17 Apr 2019 20:52:53 +0200 Subject: [PATCH] Format main.rs --- src/main.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 326e0bc3e..24b46821b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,8 +10,8 @@ extern crate rustyline; use clap::{App, Arg}; use rustpython_parser::error::ParseError; use rustpython_vm::{ - compile, error::CompileError, error::CompileErrorType, frame::Scope, import, obj::objstr, print_exception, - pyobject::PyResult, util, VirtualMachine, + compile, error::CompileError, error::CompileErrorType, frame::Scope, import, obj::objstr, + print_exception, pyobject::PyResult, util, VirtualMachine, }; use rustyline::{error::ReadlineError, Editor}; use std::path::{Path, PathBuf}; @@ -115,7 +115,12 @@ fn shell_exec(vm: &VirtualMachine, source: &str, scope: Scope) -> Result<(), Com Ok(()) } // Don't inject syntax errors for line continuation - Err(err @ CompileError{ error: CompileErrorType::Parse(ParseError::EOF(_)), .. }) => Err(err), + Err( + err @ CompileError { + error: CompileErrorType::Parse(ParseError::EOF(_)), + .. + }, + ) => Err(err), Err(err) => { let exc = vm.new_syntax_error(&err); print_exception(vm, &exc); @@ -188,7 +193,10 @@ fn run_shell(vm: &VirtualMachine) -> PyResult { } match shell_exec(vm, &input, vars.clone()) { - Err(CompileError { error: CompileErrorType::Parse(ParseError::EOF(_)), .. }) => { + Err(CompileError { + error: CompileErrorType::Parse(ParseError::EOF(_)), + .. + }) => { continuing = true; continue; }