diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 35ca411..fc14e1a 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -30,7 +30,7 @@ jobs: - name: Install mdbook II run: | cargo binstall -y mdbook-cmdrun - cargo binstall -y trunk + cargo binstall -y trunk@0.17.5 rustup target add wasm32-unknown-unknown - name: Setup Pages id: pages diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38f8cde..d06c55f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Install mdbook II run: | cargo binstall -y mdbook-cmdrun - cargo binstall -y trunk + cargo binstall -y trunk@0.17.5 rustup target add wasm32-unknown-unknown - name: Setup Pages id: pages diff --git a/src/use_broadcast_channel.rs b/src/use_broadcast_channel.rs index af70b4a..010815b 100644 --- a/src/use_broadcast_channel.rs +++ b/src/use_broadcast_channel.rs @@ -103,8 +103,6 @@ where }; let close = { - let channel = channel.clone(); - move || { if let Some(channel) = channel.get_untracked() { channel.close(); @@ -153,7 +151,7 @@ where close(); }); - return UseBroadcastChannelReturn { + UseBroadcastChannelReturn { is_supported, channel: channel.into(), message: message.into(), @@ -161,7 +159,7 @@ where close, error: error.into(), is_closed: is_closed.into(), - }; + } } /// Return type of [`use_broadcast_channel`].