diff --git a/src/judger.rs b/src/judger.rs index 6fe3d65..d6e3148 100644 --- a/src/judger.rs +++ b/src/judger.rs @@ -1,7 +1,8 @@ use std::path::Path; use tokio::fs; -use tokio::fs::{read_to_string, remove_file}; +use tokio::fs::{remove_file, File}; +use tokio::io::AsyncReadExt; use crate::config::{CONFIG, CPU_SEMAPHORE, RESULT_FILENAME, STDERR_FILENAME, STDOUT_FILENAME}; use crate::error::{Error, Result}; @@ -51,12 +52,16 @@ pub async fn compile(language: &str, code: &str, path: &Path) -> Result