(&mut self, buffer_size: usize)
| 84 | |
| 85 | |
| 86 | async fn fill_buffer(&mut self, buffer_size: usize) -> Result<VecDeque<Product>, Terminate> { |
| 87 | |
| 88 | Ok((0..buffer_size) |
| 89 | .into_iter() |
| 90 | .map(|i| { |
| 91 | |
| 92 | let ctype = match i { |
| 93 | 1 | 2 => Category::Cars, |
| 94 | 3 | 4 => Category::Mobiles, |
| 95 | 5 => Category::Accessories |
| 96 | }; |
| 97 | |
| 98 | |
| 99 | Product { |
| 100 | ctype |
| 101 | } |
| 102 | |
| 103 | }) |
| 104 | .collect::<VecDeque<Product>>()) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 |
nothing calls this directly
no outgoing calls
no test coverage detected