File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -59,21 +59,19 @@ fn shell_exec(
59
59
Err ( err) => {
60
60
// Check if the error is from an unclosed triple quoted string (which should always
61
61
// 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 ;
74
73
}
75
74
}
76
- _ => ( ) ,
77
75
} ;
78
76
79
77
// 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