From fca945a3efde1b59372fdd87aeadec01833e5496 Mon Sep 17 00:00:00 2001 From: Michael Morehouse <640167+yawpitch@users.noreply.github.com> Date: Tue, 18 Feb 2020 12:41:45 +0000 Subject: [PATCH 1/2] Improve grammar in example of 'in let' section Extends work done in #1305 to comments in the example code. --- src/flow_control/if_let.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flow_control/if_let.md b/src/flow_control/if_let.md index 953e82fd8d..708ecfd59b 100644 --- a/src/flow_control/if_let.md +++ b/src/flow_control/if_let.md @@ -104,8 +104,8 @@ Another benefit is that `if let` allows us to match non-parameterized enum varia Would you like a challenge? Fix the following example to use `if let`: ```rust,editable,ignore,mdbook-runnable -// This enum purposely doesn't #[derive(PartialEq)], -// neither we implement PartialEq for it. That's why comparing Foo::Bar==a fails below. +// This enum purposely neither implements nor derives PartialEq). +// That is why comparing Foo::Bar == a fails below. enum Foo {Bar} fn main() { From b461a3a561ec76bee75f67893b4615a9bcf64387 Mon Sep 17 00:00:00 2001 From: Michael Morehouse <640167+yawpitch@users.noreply.github.com> Date: Tue, 18 Feb 2020 16:25:08 +0000 Subject: [PATCH 2/2] Fixes errant parenthesis --- src/flow_control/if_let.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flow_control/if_let.md b/src/flow_control/if_let.md index 708ecfd59b..3742b6f683 100644 --- a/src/flow_control/if_let.md +++ b/src/flow_control/if_let.md @@ -104,7 +104,7 @@ Another benefit is that `if let` allows us to match non-parameterized enum varia Would you like a challenge? Fix the following example to use `if let`: ```rust,editable,ignore,mdbook-runnable -// This enum purposely neither implements nor derives PartialEq). +// This enum purposely neither implements nor derives PartialEq. // That is why comparing Foo::Bar == a fails below. enum Foo {Bar}