aboutsummaryrefslogtreecommitdiff
path: root/src/bitboard.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-02-23 13:21:57 +0300
committereug-vs <eugene@eug-vs.xyz>2023-02-23 14:01:19 +0300
commit43dc24718c442ef45f6cecf5790df0ab84a72cfc (patch)
tree16f446b1d5a3e0fdf638e0bcab16cf34ec338bd8 /src/bitboard.rs
parentf60c573ba71207c18a28413e3940a4e21b07c73f (diff)
downloadchessnost-43dc24718c442ef45f6cecf5790df0ab84a72cfc.tar.gz
refactor: apply clippy suggestions
Diffstat (limited to 'src/bitboard.rs')
-rw-r--r--src/bitboard.rs8
1 files changed, 4 insertions, 4 deletions
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
}