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]),
|
ECDH(&'a [u8]),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum Sex {
|
pub enum Sex {
|
||||||
NotKnown,
|
NotKnown,
|
||||||
Male,
|
Male,
|
||||||
|
@ -167,9 +167,9 @@ impl Sex {
|
||||||
impl From<u8> for Sex {
|
impl From<u8> for Sex {
|
||||||
fn from(s: u8) -> Self {
|
fn from(s: u8) -> Self {
|
||||||
match s {
|
match s {
|
||||||
31 => Sex::Male,
|
0x31 => Sex::Male,
|
||||||
32 => Sex::Female,
|
0x32 => Sex::Female,
|
||||||
39 => Sex::NotApplicable,
|
0x39 => Sex::NotApplicable,
|
||||||
_ => Sex::NotKnown,
|
_ => Sex::NotKnown,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue