summaryrefslogtreecommitdiffstats
path: root/src/doc/embedded-book/src/collections/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/embedded-book/src/collections/index.md')
-rw-r--r--src/doc/embedded-book/src/collections/index.md9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/doc/embedded-book/src/collections/index.md b/src/doc/embedded-book/src/collections/index.md
index 7319a397a..aa03666ac 100644
--- a/src/doc/embedded-book/src/collections/index.md
+++ b/src/doc/embedded-book/src/collections/index.md
@@ -49,9 +49,8 @@ in your program instead of this allocator.
``` rust,ignore
// Bump pointer allocator implementation
-extern crate cortex_m;
-
-use core::alloc::GlobalAlloc;
+use core::alloc::{GlobalAlloc, Layout};
+use core::cell::UnsafeCell;
use core::ptr;
use cortex_m::interrupt;
@@ -144,8 +143,7 @@ as they are exact same implementation.
allocator. Just `use` its collections and proceed to instantiate them:
```rust,ignore
-extern crate heapless; // v0.4.x
-
+// heapless version: v0.4.x
use heapless::Vec;
use heapless::consts::*;
@@ -155,6 +153,7 @@ fn main() -> ! {
xs.push(42).unwrap();
assert_eq!(xs.pop(), Some(42));
+ loop {}
}
```