Skip to content

Commit 0ae995d

Browse files
committed
Fix QuestionMark impl to use From
1 parent 27f5a6c commit 0ae995d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/ops.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2907,13 +2907,13 @@ pub enum Try<T, E> {
29072907
#[cfg(not(stage0))]
29082908
#[unstable(feature = "question_mark_impl", issue = "31436")]
29092909
impl<T, U, E, F> QuestionMark<Result<U, F>> for Result<T, E>
2910-
where E: Into<F>
2910+
where F: From<E>
29112911
{
29122912
type Continue = T;
29132913
fn question_mark(self) -> Try<T, Result<U, F>> {
29142914
match self {
29152915
Ok(x) => Try::Continue(x),
2916-
Err(e) => Try::Done(Err(e.into())),
2916+
Err(e) => Try::Done(Err(From::from(e))),
29172917
}
29182918
}
29192919
}

0 commit comments

Comments
 (0)