Open
Description
Given this pseudocode
let result: bool = Ok(something) == some_function_returning_result();
It should be transformed to this pseudocode
let result: bool = match some_function_returning_result() {
Ok(something) => true,
_ => false,
};
Currently I get this error.
error[E0277]: can't compare `errors::Error` with `errors::Error`
--> src/rustup/toolchain.rs:349:35
|
349 | Ok(something) == some_function_returning_result()
| ^^ no implementation for `errors::Error == errors::Error`
|
= help: the trait `std::cmp::PartialEq` is not implemented for `errors::Error`
= note: required because of the requirements on the impl of `std::cmp::PartialEq` for `std::result::Result<std::string::String, errors::Error>`
It would be nice syntax sugar to have not only for Result
, but for any generic enum.