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(
137
137
return Ok ( github:: Response ) ;
138
138
}
139
139
140
- let build_cmds: Vec < _ > = parse_build_commands ( & comment. body ) . collect ( ) ;
141
140
let mut valid_build_cmds = vec ! [ ] ;
142
141
let mut errors = String :: new ( ) ;
143
- for cmd in build_cmds {
142
+ for cmd in parse_build_commands ( & comment . body ) {
144
143
match cmd {
145
144
Ok ( cmd) => valid_build_cmds. push ( cmd) ,
146
145
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,
208
207
} )
209
208
}
210
209
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 > {
215
211
let prefix = "@rust-timer" ;
216
212
body. lines ( )
217
213
. filter_map ( move |line| {
218
214
line. find ( prefix)
219
215
. map ( |index| line[ index + prefix. len ( ) ..] . trim ( ) )
220
216
} )
221
217
. filter_map ( move |line| line. strip_prefix ( command) )
222
- . map ( move |l| l. trim_start ( ) )
218
+ . map ( |l| l. trim_start ( ) )
223
219
}
224
220
225
221
fn parse_benchmark_parameters < ' a > (
You can’t perform that action at this time.
0 commit comments