X-Git-Url: https://code.octet-stream.net/m17rt/blobdiff_plain/e67ea96c8a3d7c23ba29c6ed91ddb451927176a1..3903e719137aba15d30dd58b8d917965ec602400:/m17core/src/address.rs?ds=sidebyside diff --git a/m17core/src/address.rs b/m17core/src/address.rs index 23650cc..a224000 100755 --- a/m17core/src/address.rs +++ b/m17core/src/address.rs @@ -10,12 +10,10 @@ pub enum Address { /// /// May be up to 9 characters long - if it shorter then remaining space is filled with /// space characters. -/// -/// If the "std" feature is enabled then callsigns be converted to or created from strings. #[derive(Debug, Clone, PartialEq, Eq)] -pub struct Callsign([u8; 9]); +pub struct Callsign(pub [u8; 9]); -static ALPHABET: [u8; 40] = [ +pub static ALPHABET: [u8; 40] = [ b' ', b'A', b'B', b'C', b'D', b'E', b'F', b'G', b'H', b'I', b'J', b'K', b'L', b'M', b'N', b'O', b'P', b'Q', b'R', b'S', b'T', b'U', b'V', b'W', b'X', b'Y', b'Z', b'0', b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'-', b'/', b'.', @@ -45,7 +43,6 @@ fn decode_base_40(mut encoded: u64) -> Callsign { callsign } -#[allow(dead_code)] pub fn encode_address(address: &Address) -> [u8; 6] { let mut out: u64 = 0; match address {