Use constant instead of hardcoded integer
This commit is contained in:
@@ -59,8 +59,8 @@ pub struct ApduHeader {
|
|||||||
p2: u8,
|
p2: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<&[u8; 4]> for ApduHeader {
|
impl From<&[u8; APDU_HEADER_LEN]> for ApduHeader {
|
||||||
fn from(header: &[u8; 4]) -> Self {
|
fn from(header: &[u8; APDU_HEADER_LEN]) -> Self {
|
||||||
ApduHeader {
|
ApduHeader {
|
||||||
cla: header[0],
|
cla: header[0],
|
||||||
ins: header[1],
|
ins: header[1],
|
||||||
|
|||||||
Reference in New Issue
Block a user