mirror of
https://github.com/Zenithsiz/dynatos.git
synced 2026-02-08 04:55:59 +00:00
Replaced .with(Clone::clone) with .get_cloned().
This commit is contained in:
parent
43f9d3bd88
commit
e775a5bf7a
@ -3,7 +3,7 @@
|
||||
// Imports
|
||||
use {
|
||||
crate::Location,
|
||||
dynatos_reactive::{Effect, Signal, SignalReplace, SignalSet, SignalUpdate, SignalWith},
|
||||
dynatos_reactive::{Effect, Signal, SignalGetCloned, SignalReplace, SignalSet, SignalUpdate, SignalWith},
|
||||
std::{collections::HashMap, error::Error as StdError, mem, rc::Rc, str::FromStr},
|
||||
};
|
||||
|
||||
@ -38,7 +38,7 @@ impl<T> QuerySignal<T> {
|
||||
let key = Rc::clone(&key);
|
||||
move || {
|
||||
// Get the location and find our query key, if any
|
||||
let location = dynatos_context::with_expect::<Location, _, _>(|location| location.with(Clone::clone));
|
||||
let location = dynatos_context::with_expect::<Location, _, _>(|location| location.get_cloned());
|
||||
let value = location
|
||||
.query_pairs()
|
||||
.find_map(|(query, value)| (query == *key).then_some(value))
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
use {
|
||||
dynatos::{NodeWithDynChild, ObjectWithContext},
|
||||
dynatos_html::{html, NodeWithChildren, NodeWithText},
|
||||
dynatos_reactive::SignalWith,
|
||||
dynatos_reactive::SignalGetCloned,
|
||||
dynatos_router::Location,
|
||||
std::cell::LazyCell,
|
||||
tracing_subscriber::prelude::*,
|
||||
@ -61,7 +61,7 @@ thread_local! {
|
||||
}
|
||||
|
||||
fn render_route() -> Option<Element> {
|
||||
let location = dynatos_context::with_expect::<Location, _, _>(|location| location.with(Clone::clone));
|
||||
let location = dynatos_context::with_expect::<Location, _, _>(|location| location.get_cloned());
|
||||
|
||||
tracing::info!(%location, "Rendering route");
|
||||
match location.path().trim_end_matches('/') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user