chore: remove unnecessary return (#4226)

This commit is contained in:
Kevin Wan 2024-07-02 23:45:18 +08:00 committed by GitHub
parent 4a62d084a9
commit 490559434a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -363,9 +363,7 @@ func newGuardedWriter[T any](ctx context.Context, channel chan<- T, done <-chan
func (gw guardedWriter[T]) Write(v T) {
select {
case <-gw.ctx.Done():
return
case <-gw.done:
return
default:
gw.channel <- v
}