1 unstable release
Uses old Rust 2015
0.1.0 | Dec 8, 2020 |
---|
#27 in #helps
6KB
err_or
Rust lib which allows you to convert Option<E>
into Result<_, E>
.
[dependencies]
err_or = "0.1"
Compiler support: requires rustc 1.7+ (1.0+ if compiled with sfeatures = ["std"]
)
lib.rs
:
This crate adds err_or
and err_or_else
methods to the Option
type which allow converting Option<E>
into Result<_, E>
.
Those methods were proposed in rust-lang/rust#73040
PR, but it was closed.
This crate is #![no_std]
compatible.