mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
fix clippy
This commit is contained in:
parent
8188011fe3
commit
a96ccdc6f3
3 changed files with 4 additions and 10 deletions
|
@ -688,13 +688,13 @@ impl<'src> ScopeState {
|
|||
raw_ref.downcast_mut::<State>()
|
||||
})
|
||||
.expect(
|
||||
r###"
|
||||
r#"
|
||||
Unable to retrieve the hook that was initialized at this index.
|
||||
Consult the `rules of hooks` to understand how to use hooks properly.
|
||||
|
||||
You likely used the hook in a conditional. Hooks rely on consistent ordering between renders.
|
||||
Functions prefixed with "use" should never be called conditionally.
|
||||
"###,
|
||||
"#,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ pub async fn run(mut vdom: VirtualDom, ws: impl LiveViewSocket) -> Result<(), Li
|
|||
ws.send(b"__pong__".to_vec()).await?;
|
||||
}
|
||||
Some(Ok(evt)) => {
|
||||
if let Ok(message) = serde_json::from_str::<IpcMessage>(&*String::from_utf8_lossy(evt)) {
|
||||
if let Ok(message) = serde_json::from_str::<IpcMessage>(&String::from_utf8_lossy(evt)) {
|
||||
match message {
|
||||
IpcMessage::Event(evt) => {
|
||||
// Intercept the mounted event and insert a custom element type
|
||||
|
|
|
@ -10,8 +10,6 @@ mod rt;
|
|||
use dioxus_core::ScopeState;
|
||||
pub use rt::*;
|
||||
|
||||
use crate::rt::claim_rt;
|
||||
|
||||
pub fn use_init_signal_rt(cx: &ScopeState) {
|
||||
cx.use_hook(|| {
|
||||
let rt = claim_rt(cx.schedule_update_any());
|
||||
|
@ -96,11 +94,7 @@ impl<T: Clone + 'static> std::ops::Deref for Signal<T> {
|
|||
|
||||
impl<T> std::clone::Clone for Signal<T> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
t: PhantomData,
|
||||
id: self.id,
|
||||
rt: self.rt,
|
||||
}
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue