Explain use of Box I forgot why I needed it, then I tried to fix the match arms without success.
1 files changed, 1 insertions(+), 0 deletions(-) M poeira/src/device.rs
M poeira/src/device.rs => poeira/src/device.rs +1-0
@@ 22,6 22,7 @@ impl DeviceHandle { /// Obtains a handle on the device. #[allow(clippy::new_ret_no_self)] pub fn new(&self) -> Result<Box<dyn Device>, DeviceError> { // Same-type match arms force me to use a Box. let device = match self { DeviceHandle::Uart(p) => Uart::new_from_path(p)?.into(), DeviceHandle::Random => Random::new().into(),