Skip to content

Commit

Permalink
When converting try operators into a match expression, we use into() …
Browse files Browse the repository at this point in the history
…on the Error object in the Err arm, to support what happens automatically in a block where anyhow::Error is used
  • Loading branch information
haxorcize committed May 9, 2024
1 parent 05507c9 commit 6b131cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion retry-if-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl VisitMut for BlockModifier {
*i = Expr::Match(parse_quote! {
match #expr {
Ok(val) => val,
Err(err) => break 'block Err(err),
Err(err) => break 'block Err(err.into()),
}
});
} else if let Expr::Return(expr_return) = i {
Expand Down

0 comments on commit 6b131cf

Please sign in to comment.