fix release build
This commit is contained in:
3 files changed
+9
-6
No files matched your search
@@ -11,6 +11,7 @@ keywords = ["dom", "ui", "gui", "react", "wasm"]
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
anyhow = "1.0.66"
|
||||||
async-rwlock = "1.3.0"
|
async-rwlock = "1.3.0"
|
||||||
dioxus = { path="../dioxus" }
|
dioxus = { path="../dioxus" }
|
||||||
dioxus-router-core = { path = "../router-core"}
|
dioxus-router-core = { path = "../router-core"}
|
||||||
|
|||||||
@@ -54,11 +54,12 @@ pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element {
|
|||||||
let router = match use_router_internal(&cx) {
|
let router = match use_router_internal(&cx) {
|
||||||
Some(r) => r,
|
Some(r) => r,
|
||||||
None => {
|
None => {
|
||||||
error!("`Link` must have access to a parent router, will be inactive");
|
let msg = "`Link` must have access to a parent router";
|
||||||
|
error!("{msg}, will be inactive");
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
panic!("`Link` must have access to a parent router");
|
panic!("{}", msg);
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
return None;
|
anyhow::bail!("{msg}");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let state = loop {
|
let state = loop {
|
||||||
|
|||||||
@@ -18,11 +18,12 @@ pub fn Outlet(cx: Scope<OutletProps>) -> Element {
|
|||||||
let router = match use_router_internal(&cx) {
|
let router = match use_router_internal(&cx) {
|
||||||
Some(r) => r,
|
Some(r) => r,
|
||||||
None => {
|
None => {
|
||||||
error!("`Outlet` must have access to a parent router, will be inactive");
|
let msg = "`Outlet` must have access to a parent router";
|
||||||
|
error!("{msg}, will be inactive");
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
panic!("`Outlet` must have access to a parent router");
|
panic!("{}", msg);
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
return None;
|
anyhow::bail!("{msg}");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let state = loop {
|
let state = loop {
|
||||||
|
|||||||
Reference in new issue
Block a user