Skip to content

Commit

Permalink
Merge pull request #3 from ogghead/pre-rc1-building
Browse files Browse the repository at this point in the history
Minor updates, pointed to rc1 version of crates
  • Loading branch information
raskyld authored Nov 7, 2024
2 parents a0aa3b6 + 133aad3 commit 249cf88
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 174 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ authors = ["Enzo Nocera"]
license = "MIT"
repository = "https://github.com/leptos-rs/leptos_wasi"
description = "WASI integrations for the Leptos web framework."
version = "0.0.0"
version = "0.0.1"
edition = "2021"

[dependencies]
any_spawner = { version = "0.1.1", features = ["futures-executor"] }
throw_error = { version = "0.2.0-rc0" }
hydration_context = { version = "0.2.0-rc0" }
any_spawner = { git = "https://github.com/leptos-rs/leptos", features = ["futures-executor"] }
throw_error = { version = "0.2.0-rc1" }
hydration_context = { version = "0.2.0-rc1" }
futures = "0.3.30"
wasi = "0.13.1+wasi-0.2.0"
leptos = { version = "0.7.0-rc0", features = ["nonce", "ssr"] }
leptos_meta = { version = "0.7.0-rc0", features = ["ssr"] }
leptos_router = { version = "0.7.0-rc0", features = ["ssr"] }
leptos_macro = { version = "0.7.0-rc0", features = ["generic"] }
leptos_integration_utils = {version = "0.7.0-rc0" }
server_fn = { version = "0.7.0-rc0", features = ["generic"] }
leptos = { version = "0.7.0-rc1", features = ["nonce", "ssr"] }
leptos_meta = { version = "0.7.0-rc1", features = ["ssr"] }
leptos_router = { version = "0.7.0-rc1", features = ["ssr"] }
leptos_macro = { version = "0.7.0-rc1", features = ["generic"] }
leptos_integration_utils = { version = "0.7.0-rc1" }
server_fn = { version = "0.7.0-rc1", features = ["generic"] }
http = "1.1.0"
parking_lot = "0.12.3"
bytes = "1.7.2"
Expand Down
20 changes: 6 additions & 14 deletions src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,15 @@ impl WaitPoll {
impl Future for WaitPoll {
type Output = ();

fn poll(
self: std::pin::Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Self::Output> {
fn poll(self: std::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
match &mut self.get_mut().0 {
this @ WaitPollInner::Unregistered(_) => {
let waker = Arc::new(WaitPollWaker::new(cx.waker()));

if let Some(sender) = POLLABLE_SINK.get() {
if let WaitPollInner::Unregistered(pollable) = mem::replace(
this,
WaitPollInner::Registered(waker.clone()),
) {
if let WaitPollInner::Unregistered(pollable) =
mem::replace(this, WaitPollInner::Registered(waker.clone()))
{
sender
.clone()
.unbounded_send(TableEntry(pollable, waker.into()))
Expand All @@ -89,9 +85,7 @@ impl Future for WaitPoll {
unreachable!();
}
} else {
panic!(
"cannot create a WaitPoll before creating an Executor"
);
panic!("cannot create a WaitPoll before creating an Executor");
}
}
WaitPollInner::Registered(waker) => {
Expand Down Expand Up @@ -193,9 +187,7 @@ impl Executor {

loop {
match rx.try_recv() {
Err(_) => panic!(
"internal error: sender of run until has been dropped"
),
Err(_) => panic!("internal error: sender of run until has been dropped"),
Ok(Some(val)) => return val,
Ok(None) => {
self.poll_local();
Expand Down
Loading

0 comments on commit 249cf88

Please sign in to comment.