Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiaha committed Jan 9, 2022
1 parent 0dcecd4 commit 7682691
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/search/search_master.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ impl SearchMaster {
}

pub fn run_loop(&mut self, rx: Receiver<UCICommand>) {

let mut board = Board::new();

for cmd in rx {
Expand Down Expand Up @@ -97,17 +96,22 @@ impl SearchMaster {
self.tt = TT::new(mb_size);
println!("info string set Hash to {}MB", self.tt.mb_size());
} else {
println!("Error parsing Hash value. Size remains at {}MB", self.tt.mb_size());
println!(
"Error parsing Hash value. Size remains at {}MB",
self.tt.mb_size()
);
}
}
"Threads" => {
if let Ok(num_threads) = value.parse::<u16>() {
self.num_threads = num_threads;
println!("info string set Threads to {}", self.num_threads);
} else {
println!("Error parsing Threads value. Number remains at {}.", self.num_threads);
println!(
"Error parsing Threads value. Number remains at {}.",
self.num_threads
);
}

}
_ => {}
},
Expand Down
4 changes: 3 additions & 1 deletion src/types/board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,9 @@ impl Board {
let mut parts = fen.split_ascii_whitespace();

if parts.clone().count() < 3 {
return Err("Fen must at include at least piece placement, color, and castling string.");
return Err(
"Fen must at include at least piece placement, color, and castling string.",
);
}

let pieces_placement = parts.next().unwrap();
Expand Down

0 comments on commit 7682691

Please sign in to comment.