This commit is contained in:
Sosthène Guédon
2023-11-13 11:30:47 +01:00
committed by sosthene-nitrokey
parent 807c120f43
commit 9839e90f4f
+2 -2
View File
@@ -111,7 +111,7 @@ const BACKEND_DIR: &str = "backend-auth";
)]
pub struct PinId(u8);
/// Error obtained when trying to parse a [`PinId`][] either through [`PinId::from_path`][] or through the [`FromStr`](core::str::FromStr) implementation.
/// Error obtained when trying to parse a [`PinId`][] either through [`PinId::from_path`][] or through the [`FromStr`][] implementation.
#[derive(
Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd, Deserialize, Serialize,
)]
@@ -145,7 +145,7 @@ impl PinId {
return Err(PinIdFromStrError);
}
let id = u8::from_str_radix(&*path, 16).map_err(|_| PinIdFromStrError)?;
let id = u8::from_str_radix(path, 16).map_err(|_| PinIdFromStrError)?;
Ok(PinId(id))
}
}