Skip to content

Commit b34784e

Browse files
committed
Format main.rs
1 parent eb16f16 commit b34784e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/main.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ extern crate rustyline;
1010
use clap::{App, Arg};
1111
use rustpython_parser::error::ParseError;
1212
use rustpython_vm::{
13-
compile, error::CompileError, error::CompileErrorType, frame::Scope, import, obj::objstr, print_exception,
14-
pyobject::PyResult, util, VirtualMachine,
13+
compile, error::CompileError, error::CompileErrorType, frame::Scope, import, obj::objstr,
14+
print_exception, pyobject::PyResult, util, VirtualMachine,
1515
};
1616
use rustyline::{error::ReadlineError, Editor};
1717
use std::path::{Path, PathBuf};
@@ -115,7 +115,12 @@ fn shell_exec(vm: &VirtualMachine, source: &str, scope: Scope) -> Result<(), Com
115115
Ok(())
116116
}
117117
// Don't inject syntax errors for line continuation
118-
Err(err @ CompileError{ error: CompileErrorType::Parse(ParseError::EOF(_)), .. }) => Err(err),
118+
Err(
119+
err @ CompileError {
120+
error: CompileErrorType::Parse(ParseError::EOF(_)),
121+
..
122+
},
123+
) => Err(err),
119124
Err(err) => {
120125
let exc = vm.new_syntax_error(&err);
121126
print_exception(vm, &exc);
@@ -188,7 +193,10 @@ fn run_shell(vm: &VirtualMachine) -> PyResult {
188193
}
189194

190195
match shell_exec(vm, &input, vars.clone()) {
191-
Err(CompileError { error: CompileErrorType::Parse(ParseError::EOF(_)), .. }) => {
196+
Err(CompileError {
197+
error: CompileErrorType::Parse(ParseError::EOF(_)),
198+
..
199+
}) => {
192200
continuing = true;
193201
continue;
194202
}

0 commit comments

Comments
 (0)