qrcode: Add another TryFrom implementation
This commit is contained in:
parent
305766955b
commit
b073323089
1 changed files with 8 additions and 0 deletions
|
@ -58,6 +58,14 @@ impl TryFrom<ImageBuffer<Luma<u8>, Vec<u8>>> for QrVerification {
|
|||
}
|
||||
}
|
||||
|
||||
impl TryFrom<&[u8]> for QrVerification {
|
||||
type Error = DecodingError;
|
||||
|
||||
fn try_from(value: &[u8]) -> Result<Self, Self::Error> {
|
||||
Self::from_bytes(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<Vec<u8>> for QrVerification {
|
||||
type Error = DecodingError;
|
||||
|
||||
|
|
Loading…
Reference in a new issue