diff --git a/components/layout_2020/cell.rs b/components/layout_2020/cell.rs index e12201e4b28..8aae377b24c 100644 --- a/components/layout_2020/cell.rs +++ b/components/layout_2020/cell.rs @@ -28,6 +28,17 @@ impl Clone for ArcRefCell { } } +impl Default for ArcRefCell +where + T: Default, +{ + fn default() -> Self { + Self { + value: Arc::new(AtomicRefCell::new(Default::default())), + } + } +} + impl Deref for ArcRefCell { type Target = AtomicRefCell;