diff options
Diffstat (limited to '')
-rw-r--r-- | src/doc/embedded-book/src/peripherals/singletons.md | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/doc/embedded-book/src/peripherals/singletons.md b/src/doc/embedded-book/src/peripherals/singletons.md index 3f04aa170..1f3a556e8 100644 --- a/src/doc/embedded-book/src/peripherals/singletons.md +++ b/src/doc/embedded-book/src/peripherals/singletons.md @@ -61,8 +61,7 @@ This has a small runtime overhead because we must wrap the `SerialPort` structur Although we created our own `Peripherals` structure above, it is not necessary to do this for your code. the `cortex_m` crate contains a macro called `singleton!()` that will perform this action for you. ```rust,ignore -#[macro_use(singleton)] -extern crate cortex_m; +use cortex_m::singleton; fn main() { // OK if `main` is executed only once |