You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement `From<CtOption<T>> for Option<T>
As stated in #73 and #74 the `CtOption<T>` API is a bit
unflexible when you try to extract the value from the
`CtOption` or you want to convert the `CtOption<T>`
into an `Option<T>` or a `Result<T>`.
Therefore the conversion from `CtOption<T>` to `Option<T>`
has been implemented to avoid having situations like:
```rust
if ct_opt.is_some() {
return ct_opt.unwrap()
} else {
return Err(....)
}
```
# NOTE:
This impl is done to avoid ending up with unpractical, verbose and/or bad handled
conversions from the `CtOption<T>` wraps to an `Option<T>` or `Result<T, E>`.
This implementation doesn't intend to be constant-time nor try to protect the
leakage of the `T` since the `Option<T>` will do it anyways.
Closes#73 & #74
* Add "std" feature for CtOption conversion
* Use core::option::Option instead of std's one
* Change Rust version for MSRV test case
The code uploaded to solve #73 & #74 includes a feature that
was added to the Rust language in Rust_1.41.0 via RFC2451.
Therefore, the minimum version needed in order to allow the tests
pass for the MSRV testcase is the one mentioned avobe.
As suggested per @hdevalence, it might not be worth it to try to
support a +4yo version of Rust, so the .travis.yml has been changed
in order to update the version used to test the MSRV case to 1.41.0.
* Update MSRV policy in README.md
0 commit comments