Skip to content

Commit cd249b5

Browse files
committed
turn into one liner
1 parent fa6aca0 commit cd249b5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/tasks/submit.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,9 @@ impl SubmitTask {
395395
Ok(block_num + 1)
396396
}
397397

398-
// This function converts &[SignedFill] --> [FillPermit2]
398+
// This function converts &[SignedFill] into [FillPermit2]
399399
fn extract_fills(&self, block: &BuiltBlock) -> Vec<FillPermit2> {
400-
let mut fills = vec![];
401-
for signed_fill in block.host_fills() {
402-
fills.push(FillPermit2::from(signed_fill))
403-
}
404-
fills
400+
block.host_fills().iter().map(FillPermit2::from).collect()
405401
}
406402

407403
/// Task future for the submit task

0 commit comments

Comments
 (0)