aboutsummaryrefslogtreecommitdiff
path: root/embassy-usb/src/descriptor_reader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-usb/src/descriptor_reader.rs')
-rw-r--r--embassy-usb/src/descriptor_reader.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-usb/src/descriptor_reader.rs b/embassy-usb/src/descriptor_reader.rs
index 05adcce60..abb4b379e 100644
--- a/embassy-usb/src/descriptor_reader.rs
+++ b/embassy-usb/src/descriptor_reader.rs
@@ -11,11 +11,11 @@ pub struct Reader<'a> {
11} 11}
12 12
13impl<'a> Reader<'a> { 13impl<'a> Reader<'a> {
14 pub fn new(data: &'a [u8]) -> Self { 14 pub const fn new(data: &'a [u8]) -> Self {
15 Self { data } 15 Self { data }
16 } 16 }
17 17
18 pub fn eof(&self) -> bool { 18 pub const fn eof(&self) -> bool {
19 self.data.is_empty() 19 self.data.is_empty()
20 } 20 }
21 21
@@ -102,7 +102,7 @@ pub fn foreach_endpoint(data: &[u8], mut f: impl FnMut(EndpointInfo)) -> Result<
102 } 102 }
103 descriptor_type::ENDPOINT => { 103 descriptor_type::ENDPOINT => {
104 ep.ep_address = EndpointAddress::from(r.read_u8()?); 104 ep.ep_address = EndpointAddress::from(r.read_u8()?);
105 f(ep) 105 f(ep);
106 } 106 }
107 _ => {} 107 _ => {}
108 } 108 }