Skip to content

Commit 10310a1

Browse files
committed
fix: remove unnecessary if statement
1 parent b305237 commit 10310a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

client.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,9 +871,7 @@ func (c *client) Subscribe(topic string, qos byte, callback MessageHandler) Toke
871871
topic = strings.Join(strings.Split(topic, "/")[2:], "/")
872872
}
873873

874-
if strings.HasPrefix(topic, "$queue/") {
875-
topic = strings.TrimPrefix(topic, "$queue/")
876-
}
874+
topic = strings.TrimPrefix(topic, "$queue/")
877875

878876
if callback != nil {
879877
c.msgRouter.addRoute(topic, callback)

0 commit comments

Comments
 (0)