use std::fs::File; use std::io::prelude::*; use std::io::BufReader; use std::path::Path; use super::errors::GenericError; pub fn open_file(path: &Path) -> Result { let file = File::open(path)?; let mut reader = BufReader::new(file); let mut text = String::new(); reader.read_to_string(&mut text)?; Ok(text) }