diff options
author | eug-vs <eugene@eug-vs.xyz> | 2024-01-25 11:24:36 +0100 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2024-01-25 11:24:36 +0100 |
commit | 746e3bf17463a377b6c54b291ebef9a736d6ceb7 (patch) | |
tree | a4e965669871084b98d3ce89ac95fa9d50131699 /src/anomaly-searcher.rs | |
parent | 299c6d6dee96a50f9366955192f922d449d11f20 (diff) | |
download | chessnost-746e3bf17463a377b6c54b291ebef9a736d6ceb7.tar.gz |
chore: autoformat codecanary
Use #[rustfmt:skip] to preserve aligned blocks
Diffstat (limited to 'src/anomaly-searcher.rs')
-rw-r--r-- | src/anomaly-searcher.rs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/anomaly-searcher.rs b/src/anomaly-searcher.rs index 6b5cc15..fa5ec37 100644 --- a/src/anomaly-searcher.rs +++ b/src/anomaly-searcher.rs @@ -1,7 +1,6 @@ use std::env; use std::fs::File; use std::io::{self, BufRead, Write}; -use std::path::Path; use std::process::{Command, Stdio}; fn read_game_log(log_file: &str) -> Option<Vec<String>> { @@ -29,8 +28,16 @@ fn main() { .spawn() .expect("Failed to start the engine process"); - let mut engine_stdin = engine_process.stdin.take().expect("Failed to open engine STDIN"); - let mut engine_stdout = io::BufReader::new(engine_process.stdout.take().expect("Failed to open engine STDOUT")); + let mut engine_stdin = engine_process + .stdin + .take() + .expect("Failed to open engine STDIN"); + let mut engine_stdout = io::BufReader::new( + engine_process + .stdout + .take() + .expect("Failed to open engine STDOUT"), + ); for line in lines.iter().filter(|l| !l.contains("info string")) { if line.starts_with("<<") { @@ -42,7 +49,9 @@ fn main() { let mut response = String::new(); while response.is_empty() || response.contains("info string") { response = String::new(); - engine_stdout.read_line(&mut response).expect("Failed to read from engine STDOUT"); + engine_stdout + .read_line(&mut response) + .expect("Failed to read from engine STDOUT"); } // Print the engine's response |