Skip to content

Commit

Permalink
feat: add Default derives
Browse files Browse the repository at this point in the history
Add Default derive for LazyCell and AtomicLazyCell.
  • Loading branch information
indiv0 committed Nov 25, 2017
1 parent 06650bf commit 71bc508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
inner: UnsafeCell<Option<T>>,
}
Expand Down Expand Up @@ -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<T> {
inner: UnsafeCell<Option<T>>,
state: AtomicUsize,
Expand Down

0 comments on commit 71bc508

Please sign in to comment.