Macro assertables::assure_bag_ne[][src]

macro_rules! assure_bag_ne {
    ($left:expr, $right:expr $(,)?) => { ... };
    ($left:expr, $right:expr, $($arg:tt)+) => { ... };
}

Assure two bags are not equal.

  • When true, return Ok(true).

  • When false, return Ok(false).

  • Otherwise, return Err with a message and the values of the expressions with their debug representations.

Example

let x = assure_bag_ne!([1, 1], [1, 1, 1]);
//-> Ok(true)
let x = assure_bag_ne!([1, 1], [1, 1]);
//-> Ok(false)

This macro has a second form where a custom message can be provided.

This implementation uses [HashMap] to count items.