assertables::assert_bag

Module assert_bag_subbag

source
Expand description

Assert a bag is a subbag of another.

Pseudocode:
(collection1 into bag) ⊂ (collection2 into bag)

§Example

use assertables::*;
let a = [1, 1];
let b = [1, 1, 1];
assert_bag_subbag!(&a, &b);

This implementation uses std::collections::BTreeMap to count items and sort them.

§Module macros