From 71bc50880cd8e20002038197c9b890f5b76ad096 Mon Sep 17 00:00:00 2001 From: Nikita Pekin Date: Sat, 25 Nov 2017 12:37:46 -0500 Subject: [PATCH] feat: add Default derives Add Default derive for LazyCell and AtomicLazyCell. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1ddcc0f..0137a46 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -48,7 +48,7 @@ use std::cell::UnsafeCell; use std::sync::atomic::{AtomicUsize, Ordering}; /// A lazily filled `Cell`, with frozen contents. -#[derive(Debug)] +#[derive(Debug, Default)] pub struct LazyCell { inner: UnsafeCell>, } @@ -155,7 +155,7 @@ const LOCK: usize = 1; const SOME: usize = 2; /// A lazily filled `Cell`, with frozen contents. -#[derive(Debug)] +#[derive(Debug, Default)] pub struct AtomicLazyCell { inner: UnsafeCell>, state: AtomicUsize,