Skip to content

Commit

Permalink
feat: implement Default for NodeRef
Browse files Browse the repository at this point in the history
  • Loading branch information
tqwewe committed Oct 15, 2023
1 parent d20b2f2 commit f018969
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions leptos_dom/src/node_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ impl<T: ElementDescriptor> Clone for NodeRef<T> {

impl<T: ElementDescriptor + 'static> Copy for NodeRef<T> {}

impl<T: ElementDescriptor + 'static> Default for NodeRef<T> {
fn default() -> Self {
Self::new()
}
}

cfg_if::cfg_if! {
if #[cfg(feature = "nightly")] {
impl<T: Clone + ElementDescriptor + 'static> FnOnce<()> for NodeRef<T> {
Expand Down

0 comments on commit f018969

Please sign in to comment.