From f5ffdb9dbe563112df7a29135cd7e6026e1e6bee Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Mon, 5 Jul 2021 22:42:56 -0400 Subject: [PATCH] device path: change the length type to u16 Although the spec defines the length field as `UINT8 Length[2]`, it is always treated as a `u16` and is more convenient to access that way. --- src/proto/device_path.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto/device_path.rs b/src/proto/device_path.rs index 76db9e805..e0e801dc2 100644 --- a/src/proto/device_path.rs +++ b/src/proto/device_path.rs @@ -32,7 +32,7 @@ pub struct DevicePath { /// Data related to device path /// /// The `device_type` and `sub_type` determine the kind of data, and its size. - pub length: [u8; 2], + pub length: u16, } newtype_enum! {