Skip to content

Commit

Permalink
replace self in match arms
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
  • Loading branch information
gregdhill committed Jan 20, 2021
1 parent 7cf550c commit 4529a3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mocktopus"
version = "0.7.9"
version = "0.7.10"
authors = [
"CodeSandwich <igor.zuk@protonmail.com>",
"gregdhill <gregorydhill@outlook.com>"
Expand All @@ -21,7 +21,7 @@ travis-ci = { repository = "CodeSandwich/Mocktopus" }
doctest = false

[dependencies]
mocktopus_macros = "0.7.9"
mocktopus_macros = "0.7.10"

[dev-dependencies]
tokio = { version = "0.2", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mocktopus_macros"
version = "0.7.9"
version = "0.7.10"
authors = [
"CodeSandwich <igor.zuk@protonmail.com>",
"gregdhill <gregorydhill@outlook.com>"
Expand Down
3 changes: 3 additions & 0 deletions macros/src/item_injector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ fn replace_self_in_expr(expr: &mut syn::Expr) {
}
syn::Expr::Match(expr) => {
replace_self_in_expr(&mut expr.expr);
for arm in &mut expr.arms {
replace_self_in_expr(&mut arm.body);
}
}
syn::Expr::MethodCall(expr) => {
replace_self_in_expr(&mut expr.receiver);
Expand Down

0 comments on commit 4529a3e

Please sign in to comment.