Review comment: name all enum cases.
This commit is contained in:
parent
87dd6a711e
commit
68b4d51e1b
1 changed files with 4 additions and 2 deletions
|
@ -30,14 +30,16 @@ impl TempId {
|
|||
pub fn into_external(self) -> Option<String> {
|
||||
match self {
|
||||
TempId::External(s) => Some(s),
|
||||
_ => None,
|
||||
TempId::Tx |
|
||||
TempId::Internal(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn into_internal(self) -> Option<i64> {
|
||||
match self {
|
||||
TempId::Internal(x) => Some(x),
|
||||
_ => None,
|
||||
TempId::Tx |
|
||||
TempId::External(_) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue