diff options
author | Silvan Jegen <s.jegen@gmail.com> | 2015-10-23 19:53:23 +0200 |
---|---|---|
committer | Silvan Jegen <s.jegen@gmail.com> | 2015-10-27 21:40:57 +0100 |
commit | 957ae48b0d7e2f6d0c51b78bbeff72fc9dd44b2e (patch) | |
tree | 4f713ad94a71f12d68485f1f0e1d4cfe388c3e2a /gwic.go | |
parent | 4e2225a64d61a84aedab5d3054199a5229b23c04 (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.go | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 |