Skip to content

Commit

Permalink
Now need to use a box here
Browse files Browse the repository at this point in the history
  • Loading branch information
fangpenlin committed Jan 8, 2025
1 parent 60d7e08 commit d52b2f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/usb/msc_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ unsafe extern "C" fn storage_mount_changed_cb(event: *mut tinyusb_msc_event_t) {
}

impl MSCDevice {
pub fn new(config: &MSCDeviceConfig, storage: Box<dyn Storage>) -> Box<Self> {
Box::new(Self {
pub fn new(config: &MSCDeviceConfig, storage: Box<dyn Storage>) -> Self {
Self {
config: config.clone(),
storage,
})
}
}

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

0 comments on commit d52b2f4

Please sign in to comment.