Skip to content

Commit a317101

Browse files
committed
Tidy redundant imports
`TryFrom` and `TryInto` part of the prelude [since the 2021 edition](https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html). #236
1 parent fcd495e commit a317101

File tree

7 files changed

+4
-9
lines changed

7 files changed

+4
-9
lines changed

examples/usb_phy_serial_interrupt.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ use {
1818
stm32,
1919
usb_hs::{UsbBus, USB1_ULPI},
2020
},
21-
usb_device::prelude::*,
22-
usb_device::{bus::UsbBusAllocator, device::UsbDevice},
21+
usb_device::{
22+
bus::UsbBusAllocator,
23+
device::{UsbDevice, UsbDeviceBuilder, UsbVidPid},
24+
},
2325
usbd_serial::{DefaultBufferStore, SerialPort},
2426
};
2527

src/crc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//!
55
//! - [CRC example](https://github.com/stm32-rs/stm32h7xx-hal/blob/master/examples/crc.rs)
66
7-
use core::convert::TryInto;
87
use core::fmt;
98

109
use crate::rcc::{rec, ResetEnable};

src/ethernet/eth.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ use crate::rcc::{rec, CoreClocks, ResetEnable};
2828
use crate::stm32;
2929

3030
use smoltcp::{
31-
self,
3231
phy::{self, DeviceCapabilities},
3332
time::Instant,
3433
wire::EthernetAddress,

src/sai/i2s.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//!
33
//! Inter-IC Sound.
44
//!
5-
use core::convert::TryInto;
65
76
use crate::rcc::{rec, CoreClocks, ResetEnable};
87
use crate::sai::{GetClkSAI, Sai, SaiChannel, CLEAR_ALL_FLAGS_BITS, INTERFACE};

src/sai/pdm.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
//! let _ = block!(sai.read_data()).unwrap();
1616
//! ```
1717
18-
use core::convert::TryInto;
19-
2018
use crate::rcc::{rec, CoreClocks, ResetEnable};
2119
use crate::sai::{GetClkSAI, Sai, SaiChannel, INTERFACE};
2220

src/spi.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
//! [embedded_hal]: https://docs.rs/embedded-hal/0.2.3/embedded_hal/spi/index.html
6464
6565
use core::cell::UnsafeCell;
66-
use core::convert::From;
6766
use core::marker::PhantomData;
6867
use core::ptr;
6968

src/timer.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// TODO: on the h7x3 at least, only TIM2, TIM3, TIM4, TIM5 can support 32 bits.
99
// TIM1 is 16 bit.
1010

11-
use core::convert::TryFrom;
1211
use core::marker::PhantomData;
1312

1413
use crate::hal::timer::{CountDown, Periodic};

0 commit comments

Comments
 (0)