Support for webauthn and u2f->webauthn migrations

This commit is contained in:
Daniel García
2021-06-07 23:34:00 +02:00
parent cea7a30d82
commit c380d9c379
18 changed files with 655 additions and 127 deletions

View File

@@ -51,10 +51,10 @@ impl NumberOrString {
}
}
fn into_i32(self) -> ApiResult<i32> {
fn into_i32(&self) -> ApiResult<i32> {
use std::num::ParseIntError as PIE;
match self {
NumberOrString::Number(n) => Ok(n),
NumberOrString::Number(n) => Ok(*n),
NumberOrString::String(s) => {
s.parse().map_err(|e: PIE| crate::Error::new("Can't convert to number", e.to_string()))
}