Skip to content

Commit a09c33e

Browse files
committed
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

+1-2
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)