From 37ebc63c0847065331532f1b433ba229c7fbb1b1 Mon Sep 17 00:00:00 2001
From: Ian Luo <ian.luo@gmail.com>
Date: Thu, 13 Aug 2020 13:32:54 +0800
Subject: [PATCH] code polish for else branch

---
 cluster/router/utils/bitmap_util.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cluster/router/utils/bitmap_util.go b/cluster/router/utils/bitmap_util.go
index b34ecf893..8b4ee5538 100644
--- a/cluster/router/utils/bitmap_util.go
+++ b/cluster/router/utils/bitmap_util.go
@@ -39,9 +39,8 @@ func FallbackIfJoinToEmpty(left *roaring.Bitmap, right *roaring.Bitmap) *roaring
 	ret := JoinIfNotEqual(left, right)
 	if ret == nil || ret.IsEmpty() {
 		return right
-	} else {
-		return ret
 	}
+	return ret
 }
 
 func ToBitmap(invokers []protocol.Invoker) *roaring.Bitmap {
-- 
GitLab