Implemented Pull OTA json

This commit is contained in:
2025-01-04 22:29:43 +00:00
parent f76f248446
commit 9919495346
11 changed files with 194 additions and 35 deletions

View File

@@ -1,12 +1,8 @@
use thiserror::Error;
pub fn parse_mac_address(mac: &str) -> Result<[u8; 6], MacAddressError> {
if mac.len() != 12 {
return Err(MacAddressError::Length(mac.len()))
return Err(MacAddressError::Length(mac.len()));
}
let mut mac_bytes = [0u8; 6];
@@ -68,4 +64,3 @@ mod tests {
assert!(parse_mac_address(mac_str).is_err());
}
}