mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix: Clone for ArcResource and default to SerdeJson for Resource
This commit is contained in:
parent
a47759007f
commit
949f43d145
1 changed files with 10 additions and 1 deletions
|
@ -26,6 +26,15 @@ pub struct ArcResource<T, Ser = SerdeJson> {
|
|||
data: ArcAsyncDerived<T>,
|
||||
}
|
||||
|
||||
impl<T, Ser> Clone for ArcResource<T, Ser> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
ser: self.ser,
|
||||
data: self.data.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, Ser> Deref for ArcResource<T, Ser> {
|
||||
type Target = ArcAsyncDerived<T>;
|
||||
|
||||
|
@ -261,7 +270,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub struct Resource<T, Ser>
|
||||
pub struct Resource<T, Ser = SerdeJson>
|
||||
where
|
||||
T: Send + Sync + 'static,
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue