(v: Vec<i32>)
| 9 | } |
| 10 | |
| 11 | fn expensive_sum(v: Vec<i32>) -> i32 { |
| 12 | // Pretend our fancy little filter-map-sum is expensive and takes 500ms |
| 13 | sleep_ms(500); |
| 14 | println!("Child thread: just about finished"); |
| 15 | v.iter().filter(|&x| x % 2 == 0).map(|x| x * x).sum() |
| 16 | } |
| 17 | |
| 18 | fn main() { |
| 19 | let my_vector = vec![2, 5, 1, 0, 4, 3]; |
nothing calls this directly
no test coverage detected