Fix mistake in mapping of u8 value to Sex
This commit is contained in:
parent
6601d2d09b
commit
6c7ce6228c
1 changed files with 4 additions and 4 deletions
|
@ -145,7 +145,7 @@ pub enum DecryptMe<'a> {
|
|||
ECDH(&'a [u8]),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum Sex {
|
||||
NotKnown,
|
||||
Male,
|
||||
|
@ -167,9 +167,9 @@ impl Sex {
|
|||
impl From<u8> for Sex {
|
||||
fn from(s: u8) -> Self {
|
||||
match s {
|
||||
31 => Sex::Male,
|
||||
32 => Sex::Female,
|
||||
39 => Sex::NotApplicable,
|
||||
0x31 => Sex::Male,
|
||||
0x32 => Sex::Female,
|
||||
0x39 => Sex::NotApplicable,
|
||||
_ => Sex::NotKnown,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue