style(bitswap:notifications) rm explicit returns
Brian Tiger Chow committed
Sep 11, 2014 at 16:58 UTC
7c378126f5da179810eae77cd78b7429c9dc6167
1 file changed
+2
-4
bitswap/notifications.go
+2
-4
@@ -33,13 +33,11 @@ func (ps *notifications) Subscribe(ctx context.Context, k u.Key) <-chan *blocks.
33
select {
34
case val := <-subChan:
35
block, ok := val.(*blocks.Block)
36
- if !ok {
37
- return
36
+ if ok {
37
+ blockChannel <- block
38
}
39
- blockChannel <- block
39
case <-ctx.Done():
40
ps.wrapped.Unsub(subChan, topic)
42
- return
41
}
42
}()
43
return blockChannel