From 9c05a419fc2ad231c204087dc073677026ba9488 Mon Sep 17 00:00:00 2001 From: James Munns Date: Sun, 13 Jan 2019 16:55:59 +0100 Subject: [PATCH] Correct use of `std` --- src/peripherals/a-first-attempt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peripherals/a-first-attempt.md b/src/peripherals/a-first-attempt.md index 1f46dac..59b6560 100644 --- a/src/peripherals/a-first-attempt.md +++ b/src/peripherals/a-first-attempt.md @@ -48,7 +48,7 @@ Now, the problem is that compilers are clever. If you make two writes to the sam ```rust,ignore let systick = unsafe { &mut *(0xE000_E010 as *mut SysTick) }; -let time = unsafe { std::ptr::read_volatile(&mut systick.cvr) }; +let time = unsafe { core::ptr::read_volatile(&mut systick.cvr) }; ``` So, we've fixed one of our four problems, but now we have even more `unsafe` code! Fortunately, there's a third party crate which can help - [`volatile_register`].