Skip to content

Commit

Permalink
Removed unused function read_string
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhexists committed Dec 18, 2023
1 parent 22f2ddd commit 3c0cdbf
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/utils/read_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,3 @@ pub fn read_bytes<P: AsRef<Path>>(file_path: P) -> Result<Vec<u8>> {

Ok(bytes)
}

/// This function will be used to read string files (.txt, .rs etc etc )
pub fn read_string<P: AsRef<Path>>(file_path: P) -> Result<String> {
let mut file: std::fs::File = OpenOptions::new().read(true).open(file_path)?;
let mut content: String = String::new();
file.read_to_string(&mut content)?;

Ok(content)
}

0 comments on commit 3c0cdbf

Please sign in to comment.