From 0f4a54cd9fd1960d184f26c70167ec03af0283cc Mon Sep 17 00:00:00 2001 From: dlemmond1 Date: Thu, 8 Jun 2017 12:35:39 -0600 Subject: [PATCH] Remove two else statements Removing two unnecessary else statements --- src/chapter1/problem5.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/chapter1/problem5.go b/src/chapter1/problem5.go index 3bff2e2..7ee0874 100644 --- a/src/chapter1/problem5.go +++ b/src/chapter1/problem5.go @@ -16,10 +16,9 @@ func oneRemovalAway(smaller, larger string) bool { if r1 != r2 { if removalSeen { return false - } else { - width1 = 0 - removalSeen = true } + width1 = 0 + removalSeen = true } } return true @@ -41,9 +40,8 @@ func AreOneEditAway(input1, input2 string) bool { if r1 != r2 { if diffSeen { return false - } else { - diffSeen = true } + diffSeen = true } } return true