diff --git a/Cargo.lock b/Cargo.lock index ac79281..3ede877 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -439,7 +439,7 @@ dependencies = [ "gloo-net 0.5.0", "leptonic", "leptos", - "leptos_macro", + "leptos_macro 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", "leptos_meta", "leptos_router", "opr", @@ -927,13 +927,12 @@ dependencies = [ [[package]] name = "leptos" version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d079555ff18158a1ed28d2a8ac529b4cb5904490384064346eb2d321addde6" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" dependencies = [ "cfg-if", "leptos_config", "leptos_dom", - "leptos_macro", + "leptos_macro 0.6.9 (git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head)", "leptos_reactive", "leptos_server", "server_fn", @@ -971,8 +970,7 @@ dependencies = [ [[package]] name = "leptos_config" version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d80b4ed5f0447996b9a28879002f995d3770687630f568be41307f362f84cb7" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" dependencies = [ "config", "regex", @@ -984,8 +982,7 @@ dependencies = [ [[package]] name = "leptos_dom" version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4b4da3cb6a4dde22e68717482a4b926fb5dd182c12461b27efa37764b29d9a" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" dependencies = [ "async-recursion", "cfg-if", @@ -1029,6 +1026,23 @@ dependencies = [ "walkdir", ] +[[package]] +name = "leptos_hot_reload" +version = "0.6.9" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" +dependencies = [ + "anyhow", + "camino", + "indexmap", + "parking_lot", + "proc-macro2", + "quote", + "rstml", + "serde", + "syn", + "walkdir", +] + [[package]] name = "leptos_macro" version = "0.6.9" @@ -1040,13 +1054,35 @@ dependencies = [ "convert_case", "html-escape", "itertools", - "leptos_hot_reload", + "leptos_hot_reload 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "prettyplease", + "proc-macro-error", + "proc-macro2", + "quote", + "rstml", + "server_fn_macro 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "syn", + "tracing", + "uuid", +] + +[[package]] +name = "leptos_macro" +version = "0.6.9" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" +dependencies = [ + "attribute-derive", + "cfg-if", + "convert_case", + "html-escape", + "itertools", + "leptos_hot_reload 0.6.9 (git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head)", "prettyplease", "proc-macro-error", "proc-macro2", "quote", "rstml", - "server_fn_macro", + "server_fn_macro 0.6.9 (git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head)", "syn", "tracing", "uuid", @@ -1069,8 +1105,7 @@ dependencies = [ [[package]] name = "leptos_reactive" version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93bdcebc9822cc22a72cc9528dd794e1396152c75749ee09959f8272a8c99657" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" dependencies = [ "base64", "cfg-if", @@ -1121,12 +1156,11 @@ dependencies = [ [[package]] name = "leptos_server" version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "654b6ff6a24e79977641b5214452373b1e12fdf4c8a563fadf656c139694b4b9" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" dependencies = [ "inventory", "lazy_static", - "leptos_macro", + "leptos_macro 0.6.9 (git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head)", "leptos_reactive", "serde", "server_fn", @@ -1295,7 +1329,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opr" version = "0.1.0" -source = "git+https://github.com/ydirson/opr-rs?rev=238c2d658ecf7feb1af5a3aea506171d6515bc1f#238c2d658ecf7feb1af5a3aea506171d6515bc1f" +source = "git+https://github.com/ydirson/opr-rs?rev=d4cf9fba5c6d9971783c730a4a4ff5cfb1bfa15c#d4cf9fba5c6d9971783c730a4a4ff5cfb1bfa15c" dependencies = [ "cfg-if", "serde", @@ -1305,7 +1339,7 @@ dependencies = [ [[package]] name = "opr-test-data" version = "0.0.1" -source = "git+https://github.com/ydirson/opr-rs?rev=238c2d658ecf7feb1af5a3aea506171d6515bc1f#238c2d658ecf7feb1af5a3aea506171d6515bc1f" +source = "git+https://github.com/ydirson/opr-rs?rev=d4cf9fba5c6d9971783c730a4a4ff5cfb1bfa15c#d4cf9fba5c6d9971783c730a4a4ff5cfb1bfa15c" dependencies = [ "include_dir", ] @@ -1677,8 +1711,7 @@ dependencies = [ [[package]] name = "server_fn" version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955da1dc5fcd970c182ebf1089af6c5f19051e1f286a21f7b96490a49b7a531" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" dependencies = [ "bytes", "ciborium", @@ -1717,13 +1750,25 @@ dependencies = [ "xxhash-rust", ] +[[package]] +name = "server_fn_macro" +version = "0.6.9" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" +dependencies = [ + "const_format", + "convert_case", + "proc-macro2", + "quote", + "syn", + "xxhash-rust", +] + [[package]] name = "server_fn_macro_default" version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060af1def72353a779fcc184c53e1965d3055a38b9e827f2259b2bff2d9c371e" +source = "git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head#75e7d3bfbf8aa55106429e9e53adf572db5a2d55" dependencies = [ - "server_fn_macro", + "server_fn_macro 0.6.9 (git+https://github.com/leptos-rs/leptos?rev=refs/pull/2462/head)", "syn", ] diff --git a/Cargo.toml b/Cargo.toml index 3abf2f9..8b471e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,14 +14,18 @@ leptos_meta = { version = "0.6.0", features = ["csr"] } leptos_router = { version = "0.6.0", features = ["csr"] } serde = { version = "1.0.0" } +[patch.crates-io] +# PR for Rc +leptos = { git = "https://github.com/leptos-rs/leptos", rev = "refs/pull/2462/head" } + [build-dependencies.opr-test-data] git = "https://github.com/ydirson/opr-rs" optional = true -rev = "238c2d658ecf7feb1af5a3aea506171d6515bc1f" +rev = "d4cf9fba5c6d9971783c730a4a4ff5cfb1bfa15c" #path = "../opr-rs/opr-test-data" [dependencies.opr] git = "https://github.com/ydirson/opr-rs" -rev = "238c2d658ecf7feb1af5a3aea506171d6515bc1f" +rev = "d4cf9fba5c6d9971783c730a4a4ff5cfb1bfa15c" #path = "../opr-rs/opr" [dependencies.web-sys] diff --git a/src/main.rs b/src/main.rs index e6008f0..684f13d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -251,7 +251,7 @@ fn ArmyList(army: Army, }; view! { {move || { - let name = name.clone(); + let name = Rc::clone(&name); let url = format!("{}?id={}", opr::ARMYFORGE_SHARE_URL, army.army_id.get()); @@ -405,7 +405,7 @@ fn UnitUpgradesList(loadout_list: Vec>) -> impl IntoView { let opr::UnitUpgrade{name, ref content, ..} = upgrade; view! { {move || if i > 0 { ", " } else { "" }} - {name} " (" ")" + {Rc::clone(name)} " (" ")" } } else { panic!(); @@ -575,8 +575,8 @@ fn rules_descriptions_from_list_for_unit(unit: Rc, let opr::SpecialRuleDef{ref name, ref description} = **rule_def; view!{

- {name} ": " - {description} + {Rc::clone(name)} ": " + {Rc::clone(description)}

}.into_view() } else {view!{}.into_view()}})