summaryrefslogtreecommitdiff
path: root/gwic.go
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2015-10-23 19:53:23 +0200
committerSilvan Jegen <s.jegen@gmail.com>2015-10-27 21:40:57 +0100
commit957ae48b0d7e2f6d0c51b78bbeff72fc9dd44b2e (patch)
tree4f713ad94a71f12d68485f1f0e1d4cfe388c3e2a /gwic.go
parent4e2225a64d61a84aedab5d3054199a5229b23c04 (diff)
Remove unneeded check
The first worker in the slice will always be the first one to be done. There is no need to check whether the slice is empty either.
Diffstat (limited to 'gwic.go')
-rw-r--r--gwic.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/gwic.go b/gwic.go
index ace3fca..fdefdad 100644
--- a/gwic.go
+++ b/gwic.go
@@ -58,10 +58,7 @@ func feedworkers(wlist []*work, w string) []*work {
for _, wc := range wlist {
if wc.left == 0 {
wc.finish()
- // TODO: remove the right one?
- if len(wlist) >= 1 {
- ret = wlist[1:]
- }
+ ret = wlist[1:]
} else {
wc.c <- w
wc.left -= 1