From 43dc24718c442ef45f6cecf5790df0ab84a72cfc Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 23 Feb 2023 13:21:57 +0300 Subject: refactor: apply clippy suggestions --- src/bitboard.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/bitboard.rs') diff --git a/src/bitboard.rs b/src/bitboard.rs index ad21664..4fb5b30 100644 --- a/src/bitboard.rs +++ b/src/bitboard.rs @@ -5,7 +5,7 @@ pub type Bitboard = u64; pub trait BitboardFns { /// Print bitboard on the screen - fn print(self, title: &str) -> (); + fn print(self, title: &str); /// Return bitboard cardinality, aka number of elements in the set fn pop_count(self) -> u8; @@ -43,7 +43,7 @@ const DE_BRUJIN_SEQUENCE: [u8; 64] = [ ]; impl BitboardFns for Bitboard { - fn print(self, title: &str) -> () { + fn print(self, title: &str) { println!("\n {}", title); for rank in (0..8).rev() { print!("{}|", rank + 1); @@ -55,7 +55,7 @@ impl BitboardFns for Bitboard { } } } - return println!(" a b c d e f g h"); + println!(" a b c d e f g h"); } fn pop_count(mut self) -> u8 { @@ -64,7 +64,7 @@ impl BitboardFns for Bitboard { count += 1; self &= self - 1; } - return count; + count } -- cgit v1.2.3