diff --git a/tig-runtime/src/main.rs b/tig-runtime/src/main.rs index fd4eb8b..82f8857 100644 --- a/tig-runtime/src/main.rs +++ b/tig-runtime/src/main.rs @@ -2,7 +2,7 @@ use anyhow::{anyhow, Result}; use clap::{arg, Command}; use libloading::Library; use serde_json::{Map, Value, from_str as json_from_str}; -use std::{fs, panic, path::PathBuf}; +use std::{fs, io::Read, panic, path::PathBuf}; use tig_challenges::*; use tig_structs::core::{BenchmarkSettings, CPUArchitecture, OutputData}; use tig_utils::{dejsonify, jsonify}; @@ -103,7 +103,7 @@ fn main() { let matches = cli().get_matches(); let result = if matches.get_flag("stdin") { let mut stdin_content = String::new(); - if let Err(e) = std::io::Read::read_to_string(&mut std::io::stdin(), &mut stdin_content) { + if let Err(e) = std::io::stdin().read_to_string(&mut stdin_content) { eprintln!("Failed to read from stdin: {}", e); std::process::exit(1); } diff --git a/tig-verifier/src/main.rs b/tig-verifier/src/main.rs index fc421a4..bcd3bf7 100644 --- a/tig-verifier/src/main.rs +++ b/tig-verifier/src/main.rs @@ -69,7 +69,7 @@ fn main() { let result = if matches.get_flag("stdin") { let mut stdin_content = String::new(); - if let Err(e) = std::io::Read::read_to_string(&mut std::io::stdin(), &mut stdin_content) { + if let Err(e) = std::io::stdin().read_to_string(&mut stdin_content) { eprintln!("Failed to read from stdin: {}", e); std::process::exit(1); }