File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,21 +59,19 @@ fn shell_exec(
5959 Err ( err) => {
6060 // Check if the error is from an unclosed triple quoted string (which should always
6161 // continue)
62- match err {
63- CompileError :: Parse ( ParseError {
64- error : ParseErrorType :: Lexical ( LexicalErrorType :: UnclosedStringError ) ,
65- raw_location,
66- ..
67- } ) => {
68- let loc = raw_location. start ( ) . to_usize ( ) ;
69- let mut iter = source. chars ( ) ;
70- if let Some ( quote) = iter. nth ( loc) {
71- if iter. next ( ) == Some ( quote) && iter. next ( ) == Some ( quote) {
72- return ShellExecResult :: ContinueLine ;
73- }
62+ if let CompileError :: Parse ( ParseError {
63+ error : ParseErrorType :: Lexical ( LexicalErrorType :: UnclosedStringError ) ,
64+ raw_location,
65+ ..
66+ } ) = err
67+ {
68+ let loc = raw_location. start ( ) . to_usize ( ) ;
69+ let mut iter = source. chars ( ) ;
70+ if let Some ( quote) = iter. nth ( loc) {
71+ if iter. next ( ) == Some ( quote) && iter. next ( ) == Some ( quote) {
72+ return ShellExecResult :: ContinueLine ;
7473 }
7574 }
76- _ => ( ) ,
7775 } ;
7876
7977 // bad_error == true if we are handling an error that should be thrown even if we are continuing
You can’t perform that action at this time.
0 commit comments