idbag 0.2.3

A bag of integers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use idbag::{ArcIdU32, IdBagU32};

#[test]
fn arc() {
  let idbag = IdBagU32::new();
  let id = idbag.alloc().into_arcid();
  let id2 = id.clone();

  assert_eq!(ArcIdU32::into_inner(id2), None);
  let Some(id) = ArcIdU32::into_inner(id) else {
    panic!("Unable to into_inner()");
  };
  assert_eq!(id.get(), 1);
}

// vim: set ft=rust et sw=2 ts=2 sts=2 cinoptions=2 tw=79 :