chore: audit components
This commit is contained in:
@@ -24,6 +24,7 @@ const MIN_FILLED: usize = 5;
|
||||
|
||||
/// An avatar for a user or other entity.
|
||||
#[derive(IntoElement)]
|
||||
#[must_use]
|
||||
pub struct Avatar {
|
||||
id: SharedString,
|
||||
name: Option<SharedString>,
|
||||
@@ -210,9 +211,9 @@ fn pattern(seed: u64) -> [u8; GRID_SIZE * GRID_SIZE] {
|
||||
break;
|
||||
}
|
||||
|
||||
let ix = (start + offset) % total;
|
||||
let row = MARGIN + ix / art_columns;
|
||||
let col = MARGIN + ix % art_columns;
|
||||
let flat_index = (start + offset) % total;
|
||||
let row = MARGIN + flat_index / art_columns;
|
||||
let col = MARGIN + flat_index % art_columns;
|
||||
|
||||
if pattern[row * GRID_SIZE + col] == 0 {
|
||||
set_cell(&mut pattern, row, col, 1);
|
||||
|
||||
Reference in New Issue
Block a user