update code
This commit is contained in:
@@ -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<Bytes, std::io::Error> {
|
||||
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<String, std::io::Error> {
|
||||
let mut file = File::open(path)?;
|
||||
let mut contents = String::new();
|
||||
|
||||
Reference in New Issue
Block a user