aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src
diff options
context:
space:
mode:
authorDániel Buga <[email protected]>2024-11-06 10:44:01 +0100
committerDániel Buga <[email protected]>2024-11-06 10:48:59 +0100
commit1e850ae79149e737c1ba39a383596eabcb0bb940 (patch)
treea9b9c47c01b444f370ed8194653f3ef45c72cbc8 /embassy-executor/src
parente4f611b97c886582dc99b03e93e8f8411f61c45a (diff)
Detect and allow older nightlies
Diffstat (limited to 'embassy-executor/src')
-rw-r--r--embassy-executor/src/lib.rs1
-rw-r--r--embassy-executor/src/raw/waker.rs11
2 files changed, 11 insertions, 1 deletions
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs
index d816539ac..8e07a8b18 100644
--- a/embassy-executor/src/lib.rs
+++ b/embassy-executor/src/lib.rs
@@ -1,4 +1,5 @@
1#![cfg_attr(not(any(feature = "arch-std", feature = "arch-wasm")), no_std)] 1#![cfg_attr(not(any(feature = "arch-std", feature = "arch-wasm")), no_std)]
2#![cfg_attr(all(feature = "nightly", not(at_least_2024_09_06)), feature(waker_getters))]
2#![allow(clippy::new_without_default)] 3#![allow(clippy::new_without_default)]
3#![doc = include_str!("../README.md")] 4#![doc = include_str!("../README.md")]
4#![warn(missing_docs)] 5#![warn(missing_docs)]
diff --git a/embassy-executor/src/raw/waker.rs b/embassy-executor/src/raw/waker.rs
index 8bb2cfd05..30b8cdd4c 100644
--- a/embassy-executor/src/raw/waker.rs
+++ b/embassy-executor/src/raw/waker.rs
@@ -50,7 +50,16 @@ pub fn task_from_waker(waker: &Waker) -> TaskRef {
50 50
51 #[cfg(feature = "nightly")] 51 #[cfg(feature = "nightly")]
52 { 52 {
53 (waker.vtable(), waker.data()) 53 #[cfg(not(at_least_2024_09_06))]
54 {
55 let raw_waker = waker.as_raw();
56 (raw_waker.vtable(), raw_waker.data())
57 }
58
59 #[cfg(at_least_2024_09_06)]
60 {
61 (waker.vtable(), waker.data())
62 }
54 } 63 }
55 }; 64 };
56 65