diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-04 20:47:05 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-04 20:47:05 +0300 |
| commit | 17962fd076e857921c374b4d705a54d5e1055178 (patch) | |
| tree | 6195e9cfdc913cd95b8f577eca3f39d41b089008 /ofborg/tickborg/src/files.rs | |
| parent | 7c7f28532f1898a81b0250f875614ad3aa494a1c (diff) | |
| download | Project-Tick-17962fd076e857921c374b4d705a54d5e1055178.tar.gz Project-Tick-17962fd076e857921c374b4d705a54d5e1055178.zip | |
NOISSUE welcome to ofborg! (tickborg)
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'ofborg/tickborg/src/files.rs')
| -rw-r--r-- | ofborg/tickborg/src/files.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ofborg/tickborg/src/files.rs b/ofborg/tickborg/src/files.rs new file mode 100644 index 0000000000..9e329d83e5 --- /dev/null +++ b/ofborg/tickborg/src/files.rs @@ -0,0 +1,8 @@ +use std::fs::File; +use std::io::Read; + +pub fn file_to_str(f: &mut File) -> String { + let mut buffer = Vec::new(); + f.read_to_end(&mut buffer).expect("Reading eval output"); + String::from(String::from_utf8_lossy(&buffer)) +} |
