Skip to content

Commit

Permalink
Tidy redundant imports
Browse files Browse the repository at this point in the history
`TryFrom` and `TryInto` part of the prelude [since the 2021
edition](https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html). #236
  • Loading branch information
richardeoin committed Mar 3, 2024
1 parent fcd495e commit a317101
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 9 deletions.
6 changes: 4 additions & 2 deletions examples/usb_phy_serial_interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ use {
stm32,
usb_hs::{UsbBus, USB1_ULPI},
},
usb_device::prelude::*,
usb_device::{bus::UsbBusAllocator, device::UsbDevice},
usb_device::{
bus::UsbBusAllocator,
device::{UsbDevice, UsbDeviceBuilder, UsbVidPid},
},
usbd_serial::{DefaultBufferStore, SerialPort},
};

Expand Down
1 change: 0 additions & 1 deletion src/crc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//!
//! - [CRC example](https://github.com/stm32-rs/stm32h7xx-hal/blob/master/examples/crc.rs)
use core::convert::TryInto;
use core::fmt;

use crate::rcc::{rec, ResetEnable};
Expand Down
1 change: 0 additions & 1 deletion src/ethernet/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use crate::rcc::{rec, CoreClocks, ResetEnable};
use crate::stm32;

use smoltcp::{
self,
phy::{self, DeviceCapabilities},
time::Instant,
wire::EthernetAddress,
Expand Down
1 change: 0 additions & 1 deletion src/sai/i2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//!
//! Inter-IC Sound.
//!
use core::convert::TryInto;
use crate::rcc::{rec, CoreClocks, ResetEnable};
use crate::sai::{GetClkSAI, Sai, SaiChannel, CLEAR_ALL_FLAGS_BITS, INTERFACE};
Expand Down
2 changes: 0 additions & 2 deletions src/sai/pdm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
//! let _ = block!(sai.read_data()).unwrap();
//! ```
use core::convert::TryInto;

use crate::rcc::{rec, CoreClocks, ResetEnable};
use crate::sai::{GetClkSAI, Sai, SaiChannel, INTERFACE};

Expand Down
1 change: 0 additions & 1 deletion src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
//! [embedded_hal]: https://docs.rs/embedded-hal/0.2.3/embedded_hal/spi/index.html
use core::cell::UnsafeCell;
use core::convert::From;
use core::marker::PhantomData;
use core::ptr;

Expand Down
1 change: 0 additions & 1 deletion src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// TODO: on the h7x3 at least, only TIM2, TIM3, TIM4, TIM5 can support 32 bits.
// TIM1 is 16 bit.

use core::convert::TryFrom;
use core::marker::PhantomData;

use crate::hal::timer::{CountDown, Periodic};
Expand Down

0 comments on commit a317101

Please sign in to comment.