fix cargo check
This commit is contained in:
1 parent
b1de7d850c
commit
4f654d61b7
7 files changed
+63
-32
No files matched your search
@@ -42,11 +42,11 @@ impl Build {
|
|||||||
.platform
|
.platform
|
||||||
.unwrap_or(crate_config.dioxus_config.application.default_platform);
|
.unwrap_or(crate_config.dioxus_config.application.default_platform);
|
||||||
|
|
||||||
if let Some(target) = self.build.target {
|
if let Some(target) = self.build.target.clone() {
|
||||||
crate_config.set_target(target);
|
crate_config.set_target(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
crate_config.set_cargo_args(self.build.cargo_args);
|
crate_config.set_cargo_args(self.build.cargo_args.clone());
|
||||||
|
|
||||||
// #[cfg(feature = "plugin")]
|
// #[cfg(feature = "plugin")]
|
||||||
// let _ = PluginManager::on_build_start(&crate_config, &platform);
|
// let _ = PluginManager::on_build_start(&crate_config, &platform);
|
||||||
|
|||||||
@@ -49,14 +49,14 @@ pub struct ConfigOptsBuild {
|
|||||||
/// The feature to use for the server in a fullstack app [default: "ssr"]
|
/// The feature to use for the server in a fullstack app [default: "ssr"]
|
||||||
#[clap(long, default_value_t = { "ssr".to_string() })]
|
#[clap(long, default_value_t = { "ssr".to_string() })]
|
||||||
pub server_feature: String,
|
pub server_feature: String,
|
||||||
|
|
||||||
/// Rustc platform triple
|
|
||||||
#[clap(long)]
|
|
||||||
pub target: Option<String>,
|
|
||||||
|
|
||||||
/// Extra arguments passed to cargo build
|
/// Rustc platform triple
|
||||||
#[clap(last = true)]
|
#[clap(long)]
|
||||||
pub cargo_args: Vec<String>,
|
pub target: Option<String>,
|
||||||
|
|
||||||
|
/// Extra arguments passed to cargo build
|
||||||
|
#[clap(last = true)]
|
||||||
|
pub cargo_args: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<ConfigOptsServe> for ConfigOptsBuild {
|
impl From<ConfigOptsServe> for ConfigOptsBuild {
|
||||||
@@ -73,9 +73,10 @@ impl From<ConfigOptsServe> for ConfigOptsBuild {
|
|||||||
server_feature: serve.server_feature,
|
server_feature: serve.server_feature,
|
||||||
skip_assets: serve.skip_assets,
|
skip_assets: serve.skip_assets,
|
||||||
force_debug: serve.force_debug,
|
force_debug: serve.force_debug,
|
||||||
|
cargo_args: serve.cargo_args,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Default, Deserialize, Parser)]
|
#[derive(Clone, Debug, Default, Deserialize, Parser)]
|
||||||
pub struct ConfigOptsServe {
|
pub struct ConfigOptsServe {
|
||||||
@@ -143,7 +144,7 @@ pub struct ConfigOptsServe {
|
|||||||
/// The feature to use for the server in a fullstack app [default: "ssr"]
|
/// The feature to use for the server in a fullstack app [default: "ssr"]
|
||||||
#[clap(long, default_value_t = { "ssr".to_string() })]
|
#[clap(long, default_value_t = { "ssr".to_string() })]
|
||||||
pub server_feature: String,
|
pub server_feature: String,
|
||||||
|
|
||||||
/// Rustc platform triple
|
/// Rustc platform triple
|
||||||
#[clap(long)]
|
#[clap(long)]
|
||||||
pub target: Option<String>,
|
pub target: Option<String>,
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ use crate::{
|
|||||||
any_props::AnyProps,
|
any_props::AnyProps,
|
||||||
any_props::VProps,
|
any_props::VProps,
|
||||||
bump_frame::BumpFrame,
|
bump_frame::BumpFrame,
|
||||||
|
|
||||||
innerlude::{DynamicNode, EventHandler, VComponent, VNodeId, VText},
|
innerlude::{DynamicNode, EventHandler, VComponent, VNodeId, VText},
|
||||||
lazynodes::LazyNodes,
|
lazynodes::LazyNodes,
|
||||||
nodes::{IntoAttributeValue, IntoDynNode, RenderReturn},
|
nodes::{IntoAttributeValue, IntoDynNode, RenderReturn},
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ use crate::{
|
|||||||
use futures_util::{pin_mut, StreamExt};
|
use futures_util::{pin_mut, StreamExt};
|
||||||
use rustc_hash::{FxHashMap, FxHashSet};
|
use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
use slab::Slab;
|
use slab::Slab;
|
||||||
use std::{any::Any, cell::Cell, collections::BTreeSet, future::Future, ptr::NonNull, rc::Rc, sync::Arc};
|
use std::{
|
||||||
|
any::Any, cell::Cell, collections::BTreeSet, future::Future, ptr::NonNull, rc::Rc, sync::Arc,
|
||||||
|
};
|
||||||
|
|
||||||
/// A virtual node system that progresses user events and diffs UI trees.
|
/// A virtual node system that progresses user events and diffs UI trees.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ fn app(cx: Scope) -> Element {
|
|||||||
desktop_context.close();
|
desktop_context.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
cx.render(rsx! {
|
render! {
|
||||||
div {
|
div {
|
||||||
button {
|
button {
|
||||||
id: "button",
|
id: "button",
|
||||||
@@ -229,14 +229,11 @@ fn app(cx: Scope) -> Element {
|
|||||||
println!("{:?}", event.data);
|
println!("{:?}", event.data);
|
||||||
assert!(event.data.modifiers().is_empty());
|
assert!(event.data.modifiers().is_empty());
|
||||||
assert!(event.data.held_buttons().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!(
|
assert_eq!(
|
||||||
event.data.trigger_button(),
|
event.data.trigger_button(),
|
||||||
Some(dioxus_html::input_data::MouseButton::Primary),
|
Some(dioxus_html::input_data::MouseButton::Primary),
|
||||||
);
|
);
|
||||||
recieved_events.modify(|x| *x + 1)
|
received_events.modify(|x| *x + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div {
|
div {
|
||||||
@@ -244,7 +241,12 @@ fn app(cx: Scope) -> Element {
|
|||||||
onmousemove: move |event| {
|
onmousemove: move |event| {
|
||||||
println!("{:?}", event.data);
|
println!("{:?}", event.data);
|
||||||
assert!(event.data.modifiers().is_empty());
|
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)
|
received_events.modify(|x| *x + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,8 +255,16 @@ fn app(cx: Scope) -> Element {
|
|||||||
onclick: move |event| {
|
onclick: move |event| {
|
||||||
println!("{:?}", event.data);
|
println!("{:?}", event.data);
|
||||||
assert!(event.data.modifiers().is_empty());
|
assert!(event.data.modifiers().is_empty());
|
||||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Secondary));
|
assert!(
|
||||||
assert_eq!(event.data.trigger_button(), Some(dioxus_html::input_data::MouseButton::Secondary));
|
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)
|
received_events.modify(|x| *x + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -263,9 +273,19 @@ fn app(cx: Scope) -> Element {
|
|||||||
ondoubleclick: move |event| {
|
ondoubleclick: move |event| {
|
||||||
println!("{:?}", event.data);
|
println!("{:?}", event.data);
|
||||||
assert!(event.data.modifiers().is_empty());
|
assert!(event.data.modifiers().is_empty());
|
||||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Primary));
|
assert!(
|
||||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Secondary));
|
event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Primary),
|
||||||
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)
|
received_events.modify(|x| *x + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -274,8 +294,16 @@ fn app(cx: Scope) -> Element {
|
|||||||
onmousedown: move |event| {
|
onmousedown: move |event| {
|
||||||
println!("{:?}", event.data);
|
println!("{:?}", event.data);
|
||||||
assert!(event.data.modifiers().is_empty());
|
assert!(event.data.modifiers().is_empty());
|
||||||
assert!(event.data.held_buttons().contains(dioxus_html::input_data::MouseButton::Secondary));
|
assert!(
|
||||||
assert_eq!(event.data.trigger_button(), Some(dioxus_html::input_data::MouseButton::Secondary));
|
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)
|
received_events.modify(|x| *x + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -285,7 +313,10 @@ fn app(cx: Scope) -> Element {
|
|||||||
println!("{:?}", event.data);
|
println!("{:?}", event.data);
|
||||||
assert!(event.data.modifiers().is_empty());
|
assert!(event.data.modifiers().is_empty());
|
||||||
assert!(event.data.held_buttons().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)
|
received_events.modify(|x| *x + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -312,7 +343,6 @@ fn app(cx: Scope) -> Element {
|
|||||||
assert_eq!(event.data.location, 0);
|
assert_eq!(event.data.location, 0);
|
||||||
assert!(event.data.is_auto_repeating());
|
assert!(event.data.is_auto_repeating());
|
||||||
received_events.modify(|x| *x + 1)
|
received_events.modify(|x| *x + 1)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
@@ -354,5 +384,5 @@ fn app(cx: Scope) -> Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
@@ -216,8 +216,7 @@ pub(super) async fn desktop_handler(
|
|||||||
request: Request<Vec<u8>>,
|
request: Request<Vec<u8>>,
|
||||||
custom_head: Option<String>,
|
custom_head: Option<String>,
|
||||||
custom_index: Option<String>,
|
custom_index: Option<String>,
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)] assets_head: Option<String>,
|
||||||
assets_head: Option<String>,
|
|
||||||
root_name: &str,
|
root_name: &str,
|
||||||
asset_handlers: &AssetHandlerRegistry,
|
asset_handlers: &AssetHandlerRegistry,
|
||||||
edit_queue: &EditQueue,
|
edit_queue: &EditQueue,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ fn Route3(cx: Scope, dynamic: String) -> Element {
|
|||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
let navigator = use_navigator(cx);
|
let navigator = use_navigator(cx);
|
||||||
|
|
||||||
render! {
|
render! {
|
||||||
input {
|
input {
|
||||||
oninput: move |evt| *current_route_str.write() = evt.value.clone(),
|
oninput: move |evt| *current_route_str.write() = evt.value.clone(),
|
||||||
|
|||||||
Reference in new issue
Block a user