Skip to content

tranzystorekk/option-extra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

option-extra

CI

About

Additional utilities for common standard types, that feel missing.

Usage

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));

Contributing

If you want something added to this library, submit a PR or a discussion in the Ideas channel!

Releases

No releases published

Languages