Remove `HydrationKey` from `leptos_reactive`
This commit is contained in:
parent
e8aaa77160
commit
eb573bf242
|
@ -331,25 +331,3 @@ impl fmt::Debug for ScopeDisposer {
|
|||
f.debug_tuple("ScopeDisposer").finish()
|
||||
}
|
||||
}
|
||||
|
||||
/// This struct is used for hydrating the leptos views from the DOM.
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct HydrationKey(pub usize);
|
||||
|
||||
impl HydrationKey {
|
||||
/// Converts the [`HydrationKey`] into a string, suitable for
|
||||
/// SSR or looking up the node for hydration.
|
||||
pub fn to_string(&self, closing: bool) -> String {
|
||||
#[cfg(debug_assertions)]
|
||||
return format!("_{}{}", self.0, if closing { 'c' } else { 'o' });
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
return format!("_{}", self.0);
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for HydrationKey {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
self.0.fmt(f)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue