darn clippy

This commit is contained in:
2025-02-08 22:51:13 -05:00
parent cc14073582
commit 2302f3be35

View File

@@ -12,6 +12,7 @@ pub struct Board {
} }
impl fmt::Display for Board { impl fmt::Display for Board {
#[allow(clippy::repeat_once)] // clippy gets mad about when PADDING == 1
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let horiz_sep_line = "-".repeat(BOARD_SIZE * 2 + 1); let horiz_sep_line = "-".repeat(BOARD_SIZE * 2 + 1);
const PADDING: usize = (BOARD_SIZE - 1).ilog10() as usize + 1; const PADDING: usize = (BOARD_SIZE - 1).ilog10() as usize + 1;