aboutsummaryrefslogtreecommitdiff
path: root/src/examples/_7_full_syntax.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/examples/_7_full_syntax.rs15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/examples/_7_full_syntax.rs b/src/examples/_7_full_syntax.rs
index 80520657..f8db4087 100644
--- a/src/examples/_7_full_syntax.rs
+++ b/src/examples/_7_full_syntax.rs
@@ -2,6 +2,7 @@
//!
//! ```
//! #![deny(unsafe_code)]
+//! #![deny(warnings)]
//! #![feature(proc_macro)]
//! #![no_std]
//!
@@ -64,24 +65,24 @@
//! *r.OWNED != *r.OWNED;
//!
//! if *r.OWNED {
-//! if r.SHARED.claim(t, |shared, _| **shared) {
+//! if r.SHARED.claim(t, |shared, _| *shared) {
//! rtfm::wfi();
//! }
//! } else {
-//! r.SHARED.claim_mut(t, |shared, _| **shared = !**shared);
+//! r.SHARED.claim_mut(t, |shared, _| *shared = !*shared);
//! }
//! }
//! }
//! }
//!
-//! fn sys_tick(_t: &mut Threshold, r: SYS_TICK::Resources) {
-//! **r.ON = !**r.ON;
+//! fn sys_tick(_t: &mut Threshold, mut r: SYS_TICK::Resources) {
+//! *r.ON = !*r.ON;
//!
-//! **r.CO_OWNED += 1;
+//! *r.CO_OWNED += 1;
//! }
//!
-//! fn tim2(_t: &mut Threshold, r: TIM2::Resources) {
-//! **r.CO_OWNED += 1;
+//! fn tim2(_t: &mut Threshold, mut r: TIM2::Resources) {
+//! *r.CO_OWNED += 1;
//! }
//! ```
// Auto-generated. Do not modify.