File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -409,10 +409,10 @@ mod impl_serde {
409409 fn deserialize < D : serde:: Deserializer < ' a > > ( d : D ) -> Result < Self , D :: Error > {
410410 let val = T :: Type :: deserialize ( d) ?;
411411 Self :: from_bits ( val)
412- . or_else ( |_| Err ( D :: Error :: invalid_value (
412+ . map_err ( |_| D :: Error :: invalid_value (
413413 Unexpected :: Unsigned ( val. into ( ) ) ,
414414 & "valid bit representation"
415- ) ) )
415+ ) )
416416 }
417417 }
418418
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ fn fold_expr(expr: &syn::Expr) -> Result<u64, EvaluationError> {
7070 match expr_lit. lit {
7171 syn:: Lit :: Int ( ref lit_int) => {
7272 lit_int. base10_parse ( )
73- . or_else ( |_| Err ( LiteralOutOfRange ( expr. span ( ) ) ) )
73+ . map_err ( |_| LiteralOutOfRange ( expr. span ( ) ) )
7474 }
7575 _ => Err ( UnsupportedOperation ( expr. span ( ) ) )
7676 }
You can’t perform that action at this time.
0 commit comments