]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Simplify single case select
authorMatt Joiner <anacrolix@gmail.com>
Tue, 27 Nov 2018 23:32:44 +0000 (10:32 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 27 Nov 2018 23:32:44 +0000 (10:32 +1100)
client_test.go

index ea7cf9b780185ad016f3b0fcca87ebdf55935b96..363542c1a3a55e1df0700d19eb3a21f135419a47 100644 (file)
@@ -798,11 +798,9 @@ func testDownloadCancel(t *testing.T, ps testDownloadCancelParams) {
                }
        }()
        for !reflect.DeepEqual(completes, expected) {
-               select {
-               case _v := <-psc.Values:
-                       v := _v.(PieceStateChange)
-                       completes[v.Index] = v.Complete
-               }
+               _v := <-psc.Values
+               v := _v.(PieceStateChange)
+               completes[v.Index] = v.Complete
        }
 }