File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
site/src/request_handlers Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,9 @@ async fn handle_rust_timer(
137137 return Ok ( github:: Response ) ;
138138 }
139139
140- let build_cmds: Vec < _ > = parse_build_commands ( & comment. body ) . collect ( ) ;
141140 let mut valid_build_cmds = vec ! [ ] ;
142141 let mut errors = String :: new ( ) ;
143- for cmd in build_cmds {
142+ for cmd in parse_build_commands ( & comment . body ) {
144143 match cmd {
145144 Ok ( cmd) => valid_build_cmds. push ( cmd) ,
146145 Err ( error) => errors. push_str ( & format ! ( "Cannot parse build command: {error}\n " ) ) ,
@@ -208,18 +207,15 @@ fn parse_build_commands(body: &str) -> impl Iterator<Item = Result<BuildCommand,
208207 } )
209208}
210209
211- fn get_command_lines < ' a : ' b , ' b > (
212- body : & ' a str ,
213- command : & ' b str ,
214- ) -> impl Iterator < Item = & ' a str > + ' b {
210+ fn get_command_lines < ' a > ( body : & ' a str , command : & ' a str ) -> impl Iterator < Item = & ' a str > {
215211 let prefix = "@rust-timer" ;
216212 body. lines ( )
217213 . filter_map ( move |line| {
218214 line. find ( prefix)
219215 . map ( |index| line[ index + prefix. len ( ) ..] . trim ( ) )
220216 } )
221217 . filter_map ( move |line| line. strip_prefix ( command) )
222- . map ( move |l| l. trim_start ( ) )
218+ . map ( |l| l. trim_start ( ) )
223219}
224220
225221fn parse_benchmark_parameters < ' a > (
You can’t perform that action at this time.
0 commit comments