File tree Expand file tree Collapse file tree
plugins/bntl_utils/src/command Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,10 +128,10 @@ pub struct CompilerOptionsField;
128128
129129impl CompilerOptionsField {
130130 pub fn field ( ) -> FormInputField {
131- FormInputField :: MultilineText {
132- prompt : "Compiler options" . to_string ( ) ,
133- default : None ,
134- value : None ,
131+ FormInputField :: MultilineText {
132+ prompt : "Compiler options" . to_string ( ) ,
133+ default : None ,
134+ value : None ,
135135 }
136136 }
137137
@@ -152,7 +152,7 @@ impl CreateFromDirectory {
152152 form. add_field ( NameField :: field ( ) ) ;
153153 form. add_field ( OutputDirectoryField :: field ( ) ) ;
154154 form. add_field ( CompilerOptionsField :: field ( ) ) ;
155-
155+
156156 if !form. prompt ( ) {
157157 return ;
158158 }
@@ -304,13 +304,24 @@ fn split_args(input: &str) -> Vec<String> {
304304
305305 for c in input. chars ( ) {
306306 match c {
307- '"' => { in_quote = !in_quote; has_token = true ; }
307+ '"' => {
308+ in_quote = !in_quote;
309+ has_token = true ;
310+ }
308311 c if c. is_whitespace ( ) && !in_quote => {
309- if has_token { args. push ( std:: mem:: take ( & mut cur) ) ; has_token = false ; }
312+ if has_token {
313+ args. push ( std:: mem:: take ( & mut cur) ) ;
314+ has_token = false ;
315+ }
316+ }
317+ c => {
318+ cur. push ( c) ;
319+ has_token = true ;
310320 }
311- c => { cur. push ( c) ; has_token = true ; }
312321 }
313322 }
314- if has_token { args. push ( cur) ; }
323+ if has_token {
324+ args. push ( cur) ;
325+ }
315326 args
316327}
You can’t perform that action at this time.
0 commit comments