/iterator-assertions

Primary LanguageRustApache License 2.0Apache-2.0

iterator-assertions

paypal

Assert something about an iterator in place.

let vector = vec![1, 2, 3]
    .assert(|i| i.is_empty().not())
    .assert(|i| i.len() < 5);