8000 Update Embassy by jdswensen · Pull Request #22 · drogue-iot/ector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update Embassy #22

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

Merged
merged 2 commits into from
Feb 22, 2025
Merged
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
8 changes: 3 additions & 5 deletions ector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exclude = [".github"]
doctest = false

[dependencies]
embassy-executor = { version = "0.6", default-features = false }
embassy-executor = { version = "0.7", default-features = false }
embassy-sync = { version = "0.6", default-features = false }
portable-atomic = { version = "1.3", default-features = false }

Expand All @@ -28,12 +28,11 @@ static_cell = "2.1"


[dev-dependencies]
embassy-executor = { version = "0.6.0", default-features = false, features = [
"integrated-timers",
embassy-executor = { version = "0.7", default-features = false, features = [
"arch-std",
"executor-thread",
] }
embassy-time = { version = "0.3.2", default-features = false, features = [
embassy-time = { version = "0.4", default-features = false, features = [
"std",
] }
futures = { version = "0.3.31", default-features = false, features = [
Expand All @@ -45,7 +44,6 @@ ector = { path = ".", features = ["std", "log", "time", "test-utils"] }
[features]
default = ["std", "log", "time"]
std = [
"embassy-executor/integrated-timers",
"embassy-executor/arch-std",
"embassy-time/std",
"critical-section/std",
Expand Down
8 changes: 4 additions & 4 deletions ector/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub trait ActorRequest<M, R> {
async fn request(&self, message: M) -> R;
}

impl<'a, M> ActorAddress<M> for DynamicSender<'a, M> {
impl<M> ActorAddress<M> for DynamicSender<'_, M> {
fn try_notify(&self, message: M) -> Result<(), M> {
self.try_send(message).map_err(|e| match e {
TrySendError::Full(m) => m,
Expand All @@ -76,7 +76,7 @@ impl<'a, M> ActorAddress<M> for DynamicSender<'a, M> {
}
}

impl<'a, M, R> ActorRequest<M, R> for DynamicSender<'a, Request<M, R>> {
impl<M, R> ActorRequest<M, R> for DynamicSender<'_, Request<M, R>> {
async fn request(&self, message: M) -> R {
let channel: Channel<NoopRawMutex, R, 1> = Channel::new();
let sender: DynamicSender<'_, R> = channel.sender().into();
Expand All @@ -99,7 +99,7 @@ impl<'a, M, R> ActorRequest<M, R> for DynamicSender<'a, Request<M, R>> {
}
}

impl<'a, M, MUT, const N: usize> ActorAddress<M> for Sender<'a, MUT, M, N>
impl<M, MUT, const N: usize> ActorAddress<M> for Sender<'_, MUT, M, N>
where
MUT: RawMutex,
{
Expand All @@ -114,7 +114,7 @@ where
}
}

impl<'a, M, R, MUT, const N: usize> ActorRequest<M, R> for Sender<'a, MUT, Request<M, R>, N>
impl<M, R, MUT, const N: usize> ActorRequest<M, R> for Sender<'_, MUT, Request<M, R>, N>
where
M: 'static,
MUT: RawMutex + 'static,
Expand Down
0