From a6a8082e93eb8e034f36aea69ad6ebec7685b2d2 Mon Sep 17 00:00:00 2001 From: lychang <632945494@qq.com> Date: Fri, 12 Jan 2024 04:31:47 +0800 Subject: [PATCH] update code --- src/file.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/file.rs b/src/file.rs index e94ab64..4514295 100644 --- a/src/file.rs +++ b/src/file.rs @@ -17,13 +17,6 @@ pub(crate) fn write_file(path: &str, content: Bytes) -> Result<(), std::io::Erro Ok(()) } -pub(crate) fn read_file(path: &str) -> Result { - let mut file = File::open(path)?; - let mut contents = Vec::new(); - file.read_to_end(&mut contents)?; - Ok(Bytes::from(contents)) -} - pub(crate) fn read_file_string(path: &str) -> Result { let mut file = File::open(path)?; let mut contents = String::new();