aboutsummaryrefslogtreecommitdiff
path: root/examples/generics.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2020-10-23 20:52:58 +0000
committerGravatar GitHub <noreply@github.com> 2020-10-23 20:52:58 +0000
commitbbcae14e37c5f4ab5701b2a688bee52bfa7aaa1b (patch)
treec70a80e9bcacb54838f09141bd1d2b27e844760f /examples/generics.rs
parentb3aa9e99a975eca637582f31de20fe11ae8f7d64 (diff)
parente8eca4be37a2fe1af25b203ace5e99b31fcc3972 (diff)
downloadrtic-bbcae14e37c5f4ab5701b2a688bee52bfa7aaa1b.tar.gz
rtic-bbcae14e37c5f4ab5701b2a688bee52bfa7aaa1b.tar.zst
rtic-bbcae14e37c5f4ab5701b2a688bee52bfa7aaa1b.zip
Merge #399
399: Now all locks are symmetric r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'examples/generics.rs')
-rw-r--r--examples/generics.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/generics.rs b/examples/generics.rs
index 16327fb3..f3829a06 100644
--- a/examples/generics.rs
+++ b/examples/generics.rs
@@ -13,7 +13,6 @@ use rtic::Mutex;
mod app {
use cortex_m_semihosting::{debug, hprintln};
use lm3s6965::Interrupt;
- use rtic::Exclusive;
#[resources]
struct Resources {
@@ -49,11 +48,8 @@ mod app {
hprintln!("UART1(STATE = {})", *STATE).unwrap();
- // just to show that `shared` can be accessed directly
- *c.resources.shared += 0;
-
- // second argument has type `Exclusive<u32>`
- super::advance(STATE, Exclusive(c.resources.shared));
+ // second argument has type `resources::shared`
+ super::advance(STATE, c.resources.shared);
}
}