usb: remove msos dead code
This commit is contained in:
parent
617b0a03b9
commit
b9ecdb72bb
@ -2,8 +2,6 @@
|
||||
//!
|
||||
//! <https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-os-2-0-descriptors-specification>
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
use core::mem::size_of;
|
||||
use core::ops::Range;
|
||||
|
||||
@ -91,17 +89,6 @@ impl<'a> DescriptorSetBuilder<'a> {
|
||||
self.used += size;
|
||||
}
|
||||
|
||||
pub fn subset(&mut self, build_subset: impl FnOnce(&mut DescriptorSetBuilder<'_>)) {
|
||||
self.used += {
|
||||
let mut subset = DescriptorSetBuilder {
|
||||
used: 0,
|
||||
buf: self.remaining(),
|
||||
};
|
||||
build_subset(&mut subset);
|
||||
subset.used
|
||||
};
|
||||
}
|
||||
|
||||
pub fn remaining(&mut self) -> &mut [u8] {
|
||||
&mut self.buf[self.used..]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user