Skip to content

Commit dcb1e5a

Browse files
committed
Do not reexport definitions
1 parent 2816bdd commit dcb1e5a

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed

src/digital.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use core::{convert::From, ops::Not};
1111
/// Conversion from `bool` and logical negation are also implemented
1212
/// for this type.
1313
/// ```rust
14-
/// # use embedded_hal::digital::blocking::PinState;
14+
/// # use embedded_hal::digital::PinState;
1515
/// let state = PinState::from(false);
1616
/// assert_eq!(state, PinState::Low);
1717
/// assert_eq!(!state, PinState::High);
@@ -46,7 +46,7 @@ impl Not for PinState {
4646

4747
/// Blocking digital I/O traits
4848
pub mod blocking {
49-
pub use super::PinState;
49+
use super::PinState;
5050

5151
/// Single digital push-pull output pin
5252
pub trait OutputPin {

src/i2c.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
//! Here is an example of an embedded-hal implementation of the `Write` trait
2727
//! for both modes:
2828
//! ```
29-
//! # use embedded_hal::i2c::blocking::{SevenBitAddress, TenBitAddress, Write};
29+
//! # use embedded_hal::i2c::{SevenBitAddress, TenBitAddress, blocking::Write};
3030
//! /// I2C0 hardware peripheral which supports both 7-bit and 10-bit addressing.
3131
//! pub struct I2c0;
3232
//!
@@ -79,7 +79,7 @@
7979
//! ### Device driver compatible only with 10-bit addresses
8080
//!
8181
//! ```
82-
//! # use embedded_hal::i2c::blocking::{TenBitAddress, WriteRead};
82+
//! # use embedded_hal::i2c::{TenBitAddress, blocking::WriteRead};
8383
//! const ADDR: u16 = 0x158;
8484
//! # const TEMP_REGISTER: u8 = 0x1;
8585
//! pub struct TemperatureSensorDriver<I2C> {
@@ -119,7 +119,7 @@ impl AddressMode for TenBitAddress {}
119119
/// Blocking I2C traits
120120
pub mod blocking {
121121

122-
pub use super::{AddressMode, SevenBitAddress, TenBitAddress};
122+
use super::{AddressMode, SevenBitAddress};
123123

124124
/// Blocking read
125125
pub trait Read<A: AddressMode = SevenBitAddress> {

src/qei.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub enum Direction {
1111

1212
/// Blocking quadrature encoder interface traits
1313
pub mod blocking {
14-
pub use super::Direction;
14+
use super::Direction;
1515

1616
/// Quadrature encoder interface
1717
///
@@ -56,7 +56,7 @@ pub mod blocking {
5656
/// # type Error = Infallible;
5757
/// # type Count = u16;
5858
/// # fn count(&self) -> Result<u16, Self::Error> { Ok(0) }
59-
/// # fn direction(&self) -> Result<::hal::qei::blocking::Direction, Self::Error> { unimplemented!() }
59+
/// # fn direction(&self) -> Result<::hal::qei::Direction, Self::Error> { unimplemented!() }
6060
/// # }
6161
/// # struct Timer6;
6262
/// # impl hal::timer::nb::CountDown for Timer6 {

src/spi/blocking.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! traits. To save boilerplate when that's the case a `Default` marker trait may be provided.
55
//! Implementing that marker trait will opt in your type into a blanket implementation.
66
7-
pub use super::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
87
/// Blocking transfer
98
pub trait Transfer<W> {
109
/// Error type

src/spi/nb.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Serial Peripheral Interface
22
3-
pub use super::{Mode, Phase, Polarity, MODE_0, MODE_1, MODE_2, MODE_3};
4-
53
/// Full duplex (master mode)
64
///
75
/// # Notes

src/timer.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ pub trait Periodic {}
55

66
/// Non-blocking timer traits
77
pub mod nb {
8-
pub use super::Periodic;
98

109
/// A count down timer
1110
///

0 commit comments

Comments
 (0)