U7: tidy the submit return and the wavefront helper spawn (clippy)
Browse files at this commit48a1851ddc3d0b3acb36d7217c3d1f873ce74b38Parent: 52ab72f2 changed files +3 -6
crates/ec-h265/src/dec/cu_syntax/wpp.rsmodified+1 -3
| @@ -567,9 +567,7 @@ pub(in crate::dec) fn parse_segment( | |||
| 567 | Ok(done) | 567 | Ok(done) |
| 568 | }; | 568 | }; |
| 569 | let results: Vec<Result<Vec<RowDone>>> = std::thread::scope(|s| { | 569 | let results: Vec<Result<Vec<RowDone>>> = std::thread::scope(|s| { |
| 570 | - let helpers: Vec<_> = (1..workers.clamp(1, nrows)) | 570 | + let helpers: Vec<_> = (1..workers.clamp(1, nrows)).map(|_| s.spawn(run)).collect(); |
| 571 | - .map(|_| s.spawn(|| run())) | ||
| 572 | - .collect(); | ||
| 573 | let mut all = vec![run()]; | 571 | let mut all = vec![run()]; |
| 574 | for h in helpers { | 572 | for h in helpers { |
| 575 | all.push(h.join().unwrap_or_else(|_| { | 573 | all.push(h.join().unwrap_or_else(|_| { |
crates/ec-h265/src/dec/mod.rsmodified+2 -3
| @@ -580,7 +580,7 @@ impl Decoder { | |||
| 580 | [Vec::new(), Vec::new()] | 580 | [Vec::new(), Vec::new()] |
| 581 | }; | 581 | }; |
| 582 | let col = motion_field::collocated(dpb, slice, &cur.lists); | 582 | let col = motion_field::collocated(dpb, slice, &cur.lists); |
| 583 | - let submitted = cur.runner.submit(SliceJob { | 583 | + cur.runner.submit(SliceJob { |
| 584 | rbsp, | 584 | rbsp, |
| 585 | data_off, | 585 | data_off, |
| 586 | header: slice.clone(), | 586 | header: slice.clone(), |
| @@ -591,8 +591,7 @@ impl Decoder { | |||
| 591 | col, | 591 | col, |
| 592 | cur_poc: cur.poc, | 592 | cur_poc: cur.poc, |
| 593 | substreams, | 593 | substreams, |
| 594 | - }); | 594 | + }) |
| 595 | - submitted | ||
| 596 | } | 595 | } |
| 597 | 596 | ||
| 598 | /// C.5.2.3: store the open picture in the buffer and run the additional | 597 | /// C.5.2.3: store the open picture in the buffer and run the additional |