Skip to content

Commit a854b80

Browse files
committed
Clean up clippy lints in lib.rs
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
1 parent 54ba172 commit a854b80

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,16 @@
110110
//! method.
111111
//!
112112
//! ```ignore
113-
//! fn main() {
114-
//! let mut peripherals = stm32f30x::Peripherals::take().unwrap();
115-
//! peripherals.GPIOA.odr.write(|w| w.bits(1));
116-
//! }
113+
//! let mut peripherals = stm32f30x::Peripherals::take().unwrap();
114+
//! peripherals.GPIOA.odr.write(|w| w.bits(1));
117115
//! ```
118116
//!
119117
//! This method can only be successfully called *once* -- that's why the method returns an `Option`.
120118
//! Subsequent calls to the method will result in a `None` value being returned.
121119
//!
122120
//! ```ignore
123-
//! fn main() {
124-
//! let ok = stm32f30x::Peripherals::take().unwrap();
125-
//! let panics = stm32f30x::Peripherals::take().unwrap();
126-
//! }
121+
//! let ok = stm32f30x::Peripherals::take().unwrap();
122+
//! let panics = stm32f30x::Peripherals::take().unwrap();
127123
//! ```
128124
//!
129125
//! The singleton property can be *unsafely* bypassed using the `ptr` static method which is

0 commit comments

Comments
 (0)