#reduce #options #extension #std

no-std opt_reduce

reduce function for Option<_>

1 stable release

1.0.0 Jul 17, 2021

#28 in #reduce

MIT license

6KB

opt_reduce

crates.io documentation (docs.rs) LICENSE (MIT)

This crate provides a reduce function for Option<_> that allows to merge two options together.

This method was previously proposed for addition to std two times but both PRs were closed:

  1. #84695
  2. #87036

opt_reduce = "1"

Compiler support: requires rustc 1.31+.


lib.rs:

This crate provides a reduce function for Option<_> that allows to merge two options together.

This method was previously proposed for addition to std two times but both PRs were closed:

  1. #84695
  2. #87036

No runtime deps