From dfa8a28b06393af109d0bd0d33b0dd0ad423dceb Mon Sep 17 00:00:00 2001 From: Daniel Boros Date: Sat, 24 Aug 2024 10:26:27 +0200 Subject: [PATCH] fix: compile error --- Cargo.lock | 65 ++++++++++++++++++++++++++++++++++++++++++------- Cargo.toml | 3 ++- src/app.rs | 3 ++- src/terminal.rs | 3 ++- 4 files changed, 62 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de7cdf5..1a53f3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -309,6 +309,15 @@ dependencies = [ "half", ] +[[package]] +name = "codee" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3ad3122b0001c7f140cf4d605ef9a9e2c24d96ab0b4fb4347b76de2425f445" +dependencies = [ + "thiserror", +] + [[package]] name = "collection_literals" version = "1.0.1" @@ -517,6 +526,17 @@ dependencies = [ "syn 2.0.68", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.68", +] + [[package]] name = "drain_filter_polyfill" version = "0.1.3" @@ -938,9 +958,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -973,22 +993,21 @@ dependencies = [ [[package]] name = "leptos-use" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3272d90b77cdbb99e9060f90eb6f5738e56128b2f912db57a50efb006a26e262" +version = "0.12.0" +source = "git+https://github.com/Synphonyte/leptos-use.git#2d3f5132161e037dd4580ea49ae3b55b7427f27c" dependencies = [ - "async-trait", "cfg-if", + "codee", "cookie", "default-struct-builder", "futures-util", "gloo-timers", - "gloo-utils", "js-sys", "lazy_static", "leptos", "paste", "thiserror", + "unic-langid", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2058,6 +2077,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", +] + [[package]] name = "tinyvec" version = "1.6.1" @@ -2284,6 +2312,7 @@ version = "0.1.0" dependencies = [ "axum", "chrono", + "codee", "console_error_panic_hook", "http 1.1.0", "leptos", @@ -2322,6 +2351,24 @@ dependencies = [ "syn 2.0.68", ] +[[package]] +name = "unic-langid" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dd9d1e72a73b25e07123a80776aae3e7b0ec461ef94f9151eed6ec88005a44" +dependencies = [ + "unic-langid-impl", +] + +[[package]] +name = "unic-langid-impl" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a5422c1f65949306c99240b81de9f3f15929f5a8bfe05bb44b034cc8bf593e5" +dependencies = [ + "tinystr", +] + [[package]] name = "unicase" version = "2.7.0" @@ -2500,9 +2547,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index 3e4f0d0..1dcecce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,11 +20,12 @@ wasm-bindgen = "=0.2.93" thiserror = "1" tracing = { version = "0.1", optional = true } http = "1" -leptos-use = { version = "0.10.10" } +leptos-use = {git = "https://github.com/Synphonyte/leptos-use.git" } tracing-subscriber = "0.3.18" chrono = "0.4.38" tokio-cron-scheduler = "0.10.2" regex = "1.10.5" +codee = "0.2.0" [features] hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"] diff --git a/src/app.rs b/src/app.rs index 43b48bd..478f223 100644 --- a/src/app.rs +++ b/src/app.rs @@ -5,9 +5,10 @@ use crate::{ terminal, }; use chrono::{Datelike, Utc}; +use codee::string::FromToStringCodec; use leptos::*; use leptos_meta::*; -use leptos_use::{storage::use_session_storage, utils::FromToStringCodec}; +use leptos_use::storage::use_session_storage; #[component] pub fn App() -> impl IntoView { diff --git a/src/terminal.rs b/src/terminal.rs index b13a698..429df3f 100644 --- a/src/terminal.rs +++ b/src/terminal.rs @@ -1,9 +1,10 @@ +use codee::string::FromToStringCodec; use regex::Regex; use std::{collections::BTreeMap, sync::Arc}; use html::Input; use leptos::*; -use leptos_use::{storage::use_session_storage, use_event_listener, utils::FromToStringCodec}; +use leptos_use::{storage::use_session_storage, use_event_listener}; use crate::{ context::{CodeSetter, Exercises, InputRef, Progress},