Fix possibly incorrect usage of conversion
This commit is contained in:
parent
558f8e7769
commit
a171d90611
|
@ -36,8 +36,7 @@ func (t *defaultTicker) Chan() <-chan time.Time {
|
||||||
|
|
||||||
// Implements Ticker
|
// Implements Ticker
|
||||||
func (t *defaultTicker) Stop() {
|
func (t *defaultTicker) Stop() {
|
||||||
tt := time.Ticker(*t)
|
((*time.Ticker)(t)).Stop()
|
||||||
tt.Stop()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
|
|
|
@ -31,7 +31,7 @@ func TestRepeat(t *testing.T) {
|
||||||
for i := 0; i < cnt; i++ {
|
for i := 0; i < cnt; i++ {
|
||||||
timeout := time.After(time.Second * 2)
|
timeout := time.After(time.Second * 2)
|
||||||
select {
|
select {
|
||||||
case _ = <-rt.Chan():
|
case <-rt.Chan():
|
||||||
case <-timeout:
|
case <-timeout:
|
||||||
t.Fatal("expected RepeatTimer to fire")
|
t.Fatal("expected RepeatTimer to fire")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue