(&mut self, idx: usize, color: f_pixel, popularity: PalPop)
| 240 | } |
| 241 | |
| 242 | pub fn set(&mut self, idx: usize, color: f_pixel, popularity: PalPop) { |
| 243 | debug_assert!(idx < self.colors.len() && idx < self.pops.len()); |
| 244 | |
| 245 | if let Some(pops_idx) = self.pops.get_mut(idx) { |
| 246 | *pops_idx = popularity; |
| 247 | } |
| 248 | if let Some(colors_idx) = self.colors.get_mut(idx) { |
| 249 | *colors_idx = color; |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | #[inline(always)] |
| 254 | pub fn as_slice(&self) -> &[f_pixel] { |
no outgoing calls
no test coverage detected