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

refactor(gstd): use waker-fn instead of unsafe code #4271

Merged
merged 2 commits into from
Oct 2, 2024
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
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gstd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ hex = { workspace = true, features = ["alloc"] }
parity-scale-codec = { workspace = true, features = ["derive"] }
scale-info = { workspace = true, features = ["derive"] }
futures = { workspace = true, features = ["alloc"] }
waker-fn = "1.2.0"

[features]
#! ## Default features
Expand Down
2 changes: 1 addition & 1 deletion gstd/src/async_runtime/futures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl Task {
F: Future<Output = ()> + 'static,
{
Self {
waker: super::waker::empty(),
waker: waker_fn::waker_fn(|| {}),
future: future.boxed_local(),
lock_exceeded: false,
}
Expand Down
1 change: 0 additions & 1 deletion gstd/src/async_runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
mod futures;
mod locks;
mod signals;
mod waker;

#[cfg(not(feature = "ethexe"))]
mod reply_hooks;
Expand Down
37 changes: 0 additions & 37 deletions gstd/src/async_runtime/waker.rs

This file was deleted.

Loading