Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump embassy-executor and embassy-time #18

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "ector"
version = "0.5.0"
version = "0.6.0"
description = "Ector is an open source async, no-alloc actor framework for embedded devices."
documentation = "https://docs.rs/ector"
readme = "../README.md"
Expand All @@ -15,8 +15,8 @@ exclude = [".github"]
doctest = false

[dependencies]
embassy-executor = { version = "0.4", default-features = false }
embassy-sync = { version = "0.5", default-features = false }
embassy-executor = { version = "0.5", default-features = false }
embassy-sync = { version = "0.6", default-features = false }
atomic-polyfill = "1"

log = { version = "0.4", optional = true }
Expand All @@ -28,8 +28,8 @@ static_cell = "1.0.0"


[dev-dependencies]
embassy-executor = { version = "0.4.0", default-features = false, features = ["integrated-timers", "arch-std", "executor-thread"]}
embassy-time = { version = "0.2.0", default-features = false, features = ["std"] }
embassy-executor = { version = "0.5.0", default-features = false, features = ["integrated-timers", "arch-std", "executor-thread"]}
embassy-time = { version = "0.3.0", default-features = false, features = ["std"] }
futures = { version = "0.3", default-features = false, features = ["executor"] }
critical-section = { version = "1.1", features = ["std"] }
ector = { path = ".", features = ["std", "log", "time", "test-utils"] }
Expand Down
14 changes: 12 additions & 2 deletions ector/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ impl<'a, M, R> ActorRequest<M, R> for DynamicSender<'a, Request<M, R>> {

// We guarantee that channel lives until we've been notified on it, at which
// point its out of reach for the replier.
let reply_to = unsafe { core::mem::transmute(&sender) };
let reply_to = unsafe {
core::mem::transmute::<
&embassy_sync::channel::DynamicSender<'_, R>,
&embassy_sync::channel::DynamicSender<'_, R>,
>(&sender)
};
let message = Request::new(message, reply_to);
self.notify(message).await;
let res = channel.receive().await;
Expand Down Expand Up @@ -121,7 +126,12 @@ where

// We guarantee that channel lives until we've been notified on it, at which
// point its out of reach for the replier.
let reply_to = unsafe { core::mem::transmute(&sender) };
let reply_to = unsafe {
core::mem::transmute::<
&embassy_sync::channel::DynamicSender<'_, R>,
&embassy_sync::channel::DynamicSender<'_, R>,
>(&sender)
};
let message = Request::new(message, reply_to);
self.notify(message).await;
let res = channel.receive().await;
Expand Down
2 changes: 1 addition & 1 deletion macros/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ fn transform_sig(sig: &mut Signature) {
.predicates
.push(parse_quote_spanned!(bound_span=> Self: 'm));

for (_, arg) in sig.inputs.iter_mut().enumerate() {
for arg in sig.inputs.iter_mut() {
match arg {
FnArg::Receiver(arg) => {
let s = arg.span();
Expand Down
1 change: 0 additions & 1 deletion macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![allow(incomplete_features)]
#![feature(proc_macro_diagnostic)]

extern crate proc_macro;
mod actor;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Before upgrading check that everything is available on all tier1 targets here:
# https://rust-lang.github.io/rustup-components-history
[toolchain]
channel = "nightly-2023-11-01"
channel = "1.79"
components = ["clippy"]
Loading