Implemented Pull OTA json
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user