Skip to content

Commit

Permalink
move pattern to fn argument
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Feb 29, 2020
1 parent 7c84e45 commit a09c33e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustc_target/abi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -943,8 +943,7 @@ pub trait MaybeResult<T> {
impl<T> MaybeResult<T> for T {
type Error = !;

fn from(x: Result<T, Self::Error>) -> Self {
let Ok(x) = x;
fn from(Ok(x): Result<T, Self::Error>) -> Self {
x
}
fn to_result(self) -> Result<T, Self::Error> {
Expand Down

0 comments on commit a09c33e

Please sign in to comment.