Skip to content

Commit d52b2f4

Browse files
committed
Now need to use a box here
1 parent 60d7e08 commit d52b2f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/usb/msc_device.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ unsafe extern "C" fn storage_mount_changed_cb(event: *mut tinyusb_msc_event_t) {
4949
}
5050

5151
impl MSCDevice {
52-
pub fn new(config: &MSCDeviceConfig, storage: Box<dyn Storage>) -> Box<Self> {
53-
Box::new(Self {
52+
pub fn new(config: &MSCDeviceConfig, storage: Box<dyn Storage>) -> Self {
53+
Self {
5454
config: config.clone(),
5555
storage,
56-
})
56+
}
5757
}
5858

5959
pub fn install(&mut self) -> anyhow::Result<()> {

0 commit comments

Comments
 (0)