From eb224adec3af370d1859514f7787948ec6f072e1 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 27 Jan 2025 22:35:02 -0500 Subject: [PATCH] clippy --- src/repr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/repr.rs b/src/repr.rs index 3cad575..ad02c66 100644 --- a/src/repr.rs +++ b/src/repr.rs @@ -34,7 +34,7 @@ pub struct Board { impl fmt::Display for Board { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { for i in 0..BOARD_SIZE { - write!(f, "{}\n", "-".repeat(BOARD_SIZE * 2 + 1))?; + writeln!(f, "{}", "-".repeat(BOARD_SIZE * 2 + 1))?; write!(f, "|")?; for j in 0..BOARD_SIZE { @@ -44,7 +44,7 @@ impl fmt::Display for Board { self.get(i, j).as_ref().map(Piece::text).unwrap_or(" ") )?; } - write!(f, "\n")?; + writeln!(f)?; } Ok(()) }