]> code.octet-stream.net Git - netwatcher/blobdiff - src/util.rs
Move things around
[netwatcher] / src / util.rs
diff --git a/src/util.rs b/src/util.rs
deleted file mode 100644 (file)
index bbc4e6c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-use crate::Error;
-use std::fmt::Write;
-
-pub(crate) fn format_mac(bytes: &[u8]) -> Result<String, Error> {
-    let mut mac = String::with_capacity(bytes.len() * 3);
-    for i in 0..bytes.len() {
-        if i != 0 {
-            write!(mac, ":").map_err(|_| Error::Internal)?;
-        }
-        write!(mac, "{:02X}", bytes[i]).map_err(|_| Error::Internal)?;
-    }
-    Ok(mac)
-}