Skip to content

Commit

Permalink
adds Debug impls
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Strong committed Apr 28, 2018
1 parent dbc5957 commit eee3375
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type HashMap<K, V> = collections::HashMap<K, V>;
/// assert_eq!(last.get(), 2);
/// ```
///
#[derive(Default, Clone, PartialEq, PartialOrd, Eq)]
#[derive(Default, Clone, PartialEq, PartialOrd, Eq, Debug)]
pub struct Incr(u64);

/// A map interface allowing fast checks of whether a newly observed value
Expand Down Expand Up @@ -123,7 +123,7 @@ pub struct Map<K: Eq + Hash>(HashMap<K, u64>);
/// }
/// ```
///
#[derive(Default, Clone, PartialEq, PartialOrd, Eq)]
#[derive(Default, Clone, PartialEq, PartialOrd, Eq, Debug)]
pub struct RcIncr(Rc<Cell<u64>>);

/// `AtomicIncr` is a threadsafe, yet very fast counter, utilizing compare
Expand Down Expand Up @@ -202,7 +202,7 @@ pub struct RcIncr(Rc<Cell<u64>>);
/// stop.store(true, Ordering::SeqCst);
/// ```
///
#[derive(Default, Clone)]
#[derive(Default, Clone, Debug)]
pub struct AtomicIncr(Arc<Atomic>);

/// Like `Map`, `AtomicMap` provides simple, fast sequence checking by key, but with
Expand Down Expand Up @@ -244,7 +244,7 @@ pub struct AtomicIncr(Arc<Atomic>);
/// assert_eq!(last.get("not a key"), 0);
/// ```
///
#[derive(Default, Clone)]
#[derive(Default, Clone, Debug)]
pub struct AtomicMap<K: Eq + Hash>(HashMap<K, AtomicIncr>);

impl Incr {
Expand Down

0 comments on commit eee3375

Please sign in to comment.