fix cargo check
This commit is contained in:
1 parent
b1de7d850c
commit
4f654d61b7
7 files changed
+63
-32
No files matched your search
@@ -221,7 +221,7 @@ fn app(cx: Scope) -> Element {
|
||||
desktop_context.close();
|
||||
}
|
||||
|
||||
cx.render(rsx! {
|
||||
render! {
|
||||
div {
|
||||
button {
|
||||
id: "button",
|
||||
@@ -229,14 +229,11 @@ fn app(cx: Scope) -> Element {
|
||||
println!("{:?}", event.data);
|
||||
assert!(event.data.modifiers().is_empty());
|
||||
assert!(event.data.held_buttons().is_empty());
|
||||
assert_eq!(event.data.trigger_button(), Some(dioxus_html::input_data::MouseButton::Primary));
|
||||
received_events.modify(|x| *x + 1)
|
||||
},
|
||||
assert_eq!(
|
||||
event.data.trigger_button(),
|
||||
Some(dioxus_html::input_data::MouseButton::Primary),
|
||||
);
|
||||
recieved_events.modify(|x| *x + 1)
|
||||
received_events.modify(|x| *x + 1)
|
||||
}
|
||||
}
|
||||
div {
|
||||
@@ -244,7 +241,12 @@ fn app(cx: Scope) -> Element {
|
||||
onmousemove: move |event| {
|
||||
println!("{:?}", event.data);
|
||||
assert!(event.data.modifiers().is_empty());
|
||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Secondary));
|
||||
assert!(
|
||||
event
|
||||
.data
|
||||
.held_buttons()
|
||||
.contains(dioxus_html::input_data::MouseButton::Secondary),
|
||||
);
|
||||
received_events.modify(|x| *x + 1)
|
||||
}
|
||||
}
|
||||
@@ -253,8 +255,16 @@ fn app(cx: Scope) -> Element {
|
||||
onclick: move |event| {
|
||||
println!("{:?}", event.data);
|
||||
assert!(event.data.modifiers().is_empty());
|
||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Secondary));
|
||||
assert_eq!(event.data.trigger_button(), Some(dioxus_html::input_data::MouseButton::Secondary));
|
||||
assert!(
|
||||
event
|
||||
.data
|
||||
.held_buttons()
|
||||
.contains(dioxus_html::input_data::MouseButton::Secondary),
|
||||
);
|
||||
assert_eq!(
|
||||
event.data.trigger_button(),
|
||||
Some(dioxus_html::input_data::MouseButton::Secondary),
|
||||
);
|
||||
received_events.modify(|x| *x + 1)
|
||||
}
|
||||
}
|
||||
@@ -263,9 +273,19 @@ fn app(cx: Scope) -> Element {
|
||||
ondoubleclick: move |event| {
|
||||
println!("{:?}", event.data);
|
||||
assert!(event.data.modifiers().is_empty());
|
||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Primary));
|
||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Secondary));
|
||||
assert_eq!(event.data.trigger_button(), Some(dioxus_html::input_data::MouseButton::Secondary));
|
||||
assert!(
|
||||
event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Primary),
|
||||
);
|
||||
assert!(
|
||||
event
|
||||
.data
|
||||
.held_buttons()
|
||||
.contains(dioxus_html::input_data::MouseButton::Secondary),
|
||||
);
|
||||
assert_eq!(
|
||||
event.data.trigger_button(),
|
||||
Some(dioxus_html::input_data::MouseButton::Secondary),
|
||||
);
|
||||
received_events.modify(|x| *x + 1)
|
||||
}
|
||||
}
|
||||
@@ -274,8 +294,16 @@ fn app(cx: Scope) -> Element {
|
||||
onmousedown: move |event| {
|
||||
println!("{:?}", event.data);
|
||||
assert!(event.data.modifiers().is_empty());
|
||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Secondary));
|
||||
assert_eq!(event.data.trigger_button(), Some(dioxus_html::input_data::MouseButton::Secondary));
|
||||
assert!(
|
||||
event
|
||||
.data
|
||||
.held_buttons()
|
||||
.contains(dioxus_html::input_data::MouseButton::Secondary),
|
||||
);
|
||||
assert_eq!(
|
||||
event.data.trigger_button(),
|
||||
Some(dioxus_html::input_data::MouseButton::Secondary),
|
||||
);
|
||||
received_events.modify(|x| *x + 1)
|
||||
}
|
||||
}
|
||||
@@ -285,7 +313,10 @@ fn app(cx: Scope) -> Element {
|
||||
println!("{:?}", event.data);
|
||||
assert!(event.data.modifiers().is_empty());
|
||||
assert!(event.data.held_buttons().is_empty());
|
||||
assert_eq!(event.data.trigger_button(), Some(dioxus_html::input_data::MouseButton::Primary));
|
||||
assert_eq!(
|
||||
event.data.trigger_button(),
|
||||
Some(dioxus_html::input_data::MouseButton::Primary),
|
||||
);
|
||||
received_events.modify(|x| *x + 1)
|
||||
}
|
||||
}
|
||||
@@ -312,7 +343,6 @@ fn app(cx: Scope) -> Element {
|
||||
assert_eq!(event.data.location, 0);
|
||||
assert!(event.data.is_auto_repeating());
|
||||
received_events.modify(|x| *x + 1)
|
||||
|
||||
}
|
||||
}
|
||||
input {
|
||||
@@ -354,5 +384,5 @@ fn app(cx: Scope) -> Element {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -216,8 +216,7 @@ pub(super) async fn desktop_handler(
|
||||
request: Request<Vec<u8>>,
|
||||
custom_head: Option<String>,
|
||||
custom_index: Option<String>,
|
||||
#[allow(unused_variables)]
|
||||
assets_head: Option<String>,
|
||||
#[allow(unused_variables)] assets_head: Option<String>,
|
||||
root_name: &str,
|
||||
asset_handlers: &AssetHandlerRegistry,
|
||||
edit_queue: &EditQueue,
|
||||
|
||||
Reference in new issue
Block a user