MCPcopy Create free account
hub / github.com/PerroEngine/Perro / for_each

Method for_each

perro_source/core/perro_structs/src/structs/matrix/mod.rs:428–435  ·  view source on GitHub ↗
(&self, mut f: impl FnMut(usize, usize, &T))

Source from the content-addressed store, hash-verified

426
427 #[inline]
428 pub fn for_each(&self, mut f: impl FnMut(usize, usize, &T)) {
429 for row in 0..ROWS {
430 for col in 0..COLS {
431 // SAFETY: row/col come from matrix bounds.
432 f(row, col, unsafe { self.get_unchecked(row, col) });
433 }
434 }
435 }
436
437 #[inline]
438 pub fn for_each_mut(&mut self, mut f: impl FnMut(usize, usize, &mut T)) -> &mut Self {

Calls 1

get_uncheckedMethod · 0.80