effect_util/lib.rs
1pub mod effect_error;
2
3use std::fs;
4use std::io::prelude::*;
5
6pub fn file_to_bytes(path: &str) -> Vec<u8> {
7 let mut file_bytes: Vec<u8> = Vec::new();
8 let mut file = fs::File::open(path).expect(format!("Could not find file {path}").as_str());
9 file.read_to_end(&mut file_bytes).unwrap();
10 file_bytes
11}