From 746e3bf17463a377b6c54b291ebef9a736d6ceb7 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 25 Jan 2024 11:24:36 +0100 Subject: chore: autoformat code Use #[rustfmt:skip] to preserve aligned blocks --- src/anomaly-searcher.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/anomaly-searcher.rs') 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> { @@ -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 -- cgit v1.2.3