diff --git a/src/tools.rs b/src/tools.rs index 6932fc56..1891719a 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -79,14 +79,7 @@ pub fn file_read_firstline>(path: P) -> Result>(path: P) -> Result, std::io::Error> { - - let mut file = std::fs::File::open(path)?; - - let mut buffer = Vec::new(); - - file.read_to_end(&mut buffer)?; - - Ok(buffer) + std::fs::read(path) } /// Atomically write a file. We first create a temporary file, which