Crate opt_reduce

Source
Expand description

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

Traits§

OptionExt
Option<_> extension that adds reduce method to it.

Functions§

reduce
Merges 2 options a and b together.