Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a09c33e

Browse files
committedFeb 29, 2020
move pattern to fn argument
1 parent 7c84e45 commit a09c33e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/librustc_target/abi/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,7 @@ pub trait MaybeResult<T> {
943943
impl<T> MaybeResult<T> for T {
944944
type Error = !;
945945

946-
fn from(x: Result<T, Self::Error>) -> Self {
947-
let Ok(x) = x;
946+
fn from(Ok(x): Result<T, Self::Error>) -> Self {
948947
x
949948
}
950949
fn to_result(self) -> Result<T, Self::Error> {

0 commit comments

Comments
 (0)
Please sign in to comment.