Skip to content

Commit

Permalink
bump dx, fmt, clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Mar 19, 2024
1 parent 4d8ae33 commit 33f6fce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ members = [

[workspace.dependencies]
dioxus-std = { path = "./std" }
dioxus = { version = "0.5.0-alpha.0" }
dioxus-web = { version = "0.5.0-alpha.0" }
dioxus-desktop = { version = "0.5.0-alpha.0" }
dioxus = { version = "0.5.0-alpha.2" }
dioxus-web = { version = "0.5.0-alpha.2" }
dioxus-desktop = { version = "0.5.0-alpha.2" }
4 changes: 2 additions & 2 deletions std/src/utils/channel/use_listen_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn use_listen_channel<MessageType: Clone + 'static, Handler>(
Handler: Future<Output = ()> + 'static,
{
let action = use_hook(|| Rc::new(action));
use_memo_with_dependencies((channel,), move |(mut channel,)| {
use_memo(use_reactive(channel, move |mut channel| {
to_owned![action];
spawn(async move {
let mut receiver = channel.receiver();
Expand All @@ -28,5 +28,5 @@ pub fn use_listen_channel<MessageType: Clone + 'static, Handler>(
}
}
})
});
}));
}
8 changes: 2 additions & 6 deletions std/src/utils/rw/use_rw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ impl<T> UseRw<T> {
}

pub fn write(&self, new_value: T) -> Result<(), UseRwError> {
let rw_lock = self
.value
.read();
let mut lock = rw_lock
.write()
.map_err(|_| UseRwError::Poisoned)?;
let rw_lock = self.value.read();
let mut lock = rw_lock.write().map_err(|_| UseRwError::Poisoned)?;
*lock = new_value;
self.needs_update();
Ok(())
Expand Down

0 comments on commit 33f6fce

Please sign in to comment.