aboutsummaryrefslogtreecommitdiff
path: root/src/anomaly-searcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/anomaly-searcher.rs')
-rw-r--r--src/anomaly-searcher.rs17
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