summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-15 16:18:40 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-15 16:18:40 +0800
commita01623882ed8eb10f1b3d2b6431d7cfdefd68ae1 (patch)
treecd7ca3975e6fc8f9952843d9a97d1c903e2a60b8
parentfcc6a59247f7bb8c3aa45fc2d3dd3eda66f2c0e0 (diff)
downloadgitlab-ce-a01623882ed8eb10f1b3d2b6431d7cfdefd68ae1.tar.gz
Avoid assignment in if
-rw-r--r--lib/gitlab/email/receiver.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb
index fef9ee8402b..77ed6b9f7d9 100644
--- a/lib/gitlab/email/receiver.rb
+++ b/lib/gitlab/email/receiver.rb
@@ -28,8 +28,9 @@ module Gitlab
mail = build_mail
mail_key = extract_mail_key(mail)
+ handler = Handler.for(mail, mail_key)
- if handler = Handler.for(mail, mail_key)
+ if handler
handler.execute
else
raise UnknownIncomingEmail