mirror of
https://github.com/servo/servo.git
synced 2025-08-17 19:35:33 +01:00
Implement Default
for ArcRefCell
This commit is contained in:
parent
9cb824e77c
commit
5b3f277465
1 changed files with 11 additions and 0 deletions
|
@ -28,6 +28,17 @@ impl<T> Clone for ArcRefCell<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> Default for ArcRefCell<T>
|
||||
where
|
||||
T: Default,
|
||||
{
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
value: Arc::new(AtomicRefCell::new(Default::default())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deref for ArcRefCell<T> {
|
||||
type Target = AtomicRefCell<T>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue