Skip to content

Commit

Permalink
feat: StoredValue::default (#2818)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisp60 authored Aug 14, 2024
1 parent 3469e93 commit aa49ad7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions reactive_graph/src/owner/stored_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,17 @@ where
}
}

impl<T, S> Default for StoredValue<T, S>
where
T: Default + 'static,
S: Storage<T>,
{
#[track_caller] // Default trait is not annotated with #[track_caller]
fn default() -> Self {
Self::new_with_storage(Default::default())
}
}

impl<T> StoredValue<T>
where
T: Send + Sync + 'static,
Expand Down

0 comments on commit aa49ad7

Please sign in to comment.