Skip to content

Commit

Permalink
impr: derive Debug impls
Browse files Browse the repository at this point in the history
Derive `Debug` impls for the `LazyCell` and `AtomicLazyCell` structs.
  • Loading branch information
oconnor663 authored and indiv0 committed Mar 24, 2017
1 parent cd71973 commit 9da0a5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ use std::cell::UnsafeCell;
use std::sync::atomic::{AtomicUsize, Ordering};

/// A lazily filled `Cell`, with frozen contents.
#[derive(Debug)]
pub struct LazyCell<T> {
inner: UnsafeCell<Option<T>>,
}
Expand Down Expand Up @@ -121,6 +122,7 @@ const LOCK: usize = 1;
const SOME: usize = 2;

/// A lazily filled `Cell`, with frozen contents.
#[derive(Debug)]
pub struct AtomicLazyCell<T> {
inner: UnsafeCell<Option<T>>,
state: AtomicUsize,
Expand Down

0 comments on commit 9da0a5a

Please sign in to comment.