qrcode: Add another TryFrom implementation

This commit is contained in:
Damir Jelić 2021-05-20 14:04:07 +02:00
parent 305766955b
commit b073323089

View file

@ -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;