assertables

Module assert_len

Source
Expand description

Assert for comparing lengths.

These macros help with collection lengths, such as for strings, arrays, vectors, iterators, and anything that has a typical .len() method.

Compare a length with another length:

Compare a length with an expression:

§Example

use assertables::*;

let a = "x";
let b = "x";
assert_len_eq!(a, b);

Modules§