summaryrefslogtreecommitdiff
path: root/src/binfile.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/binfile.rs')
-rw-r--r--src/binfile.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/binfile.rs b/src/binfile.rs
deleted file mode 100644
index 5b0b783..0000000
--- a/src/binfile.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-use std::io::{Error,ErrorKind};
-
-pub fn dump_u32_vec(file_name: &str, data: Vec<u32>) -> Result<(), Error> {
- use std::fs::File;
- use std::io::Write;
- if let Ok(mut file) = File::create(file_name) {
- for value in data {
- file.write_all(&value.to_le_bytes())?;
- }
- } else {
- return Err(Error::new(ErrorKind::Other, "Error creating file"));
- }
- Ok(())
-}
-
-pub fn dump_u16_vec(file_name: &str, data: Vec<u16>) -> Result<(), Error> {
- use std::fs::File;
- use std::io::Write;
- if let Ok(mut file) = File::create(file_name) {
- for value in data {
- file.write_all(&value.to_le_bytes())?;
- }
- } else {
- return Err(Error::new(ErrorKind::Other, "Error creating file"));
- }
- Ok(())
-}