Additional utilities for common standard types, that feel missing.
New methods live in the OptionExt
/ ResultExt
traits:
use option_extra::OptionExt;
assert_eq!(Some(1).zip_lazy(|| Some("abcd")), Some((1, "abcd")));
use option_extra::ResultExt;
assert!(Ok::<_, ()>(1).satisfies(|&n| n % 2 == 1));
If you want something added to this library, submit a PR or a discussion in the Ideas channel!