Skip to content

v0.3.0

Latest
Compare
Choose a tag to compare
@san-smith san-smith released this 03 Jun 16:19
· 5 commits to master since this release

Added new methods to Option and Result.

Option:

  • flatMap - returns None or calls f with the wrapped value and returns Some(f(value));
  • filter - returns None if the option is None or predicate returns false, otherwise returns Some.

Result:

  • flatMap - calls f if the result is Ok, otherwise returns the Err value of self;
  • flatMapErr - Calls f if the result is Err, otherwise returns the Ok value of self.

Full Changelog: v0.2.1...v0.3.0