Remove redundant code at line 365, `oldCtx := req.Context()`, because it's the same as line 349.
Change-Id: I9b028e8c8740c22945708b143e4e86a0baa40f64
GitHub-Last-Rev:
4ad0f3871b1d473246af7cf27c158140c7248cf1
GitHub-Pull-Request: golang/go#54925
Reviewed-on: https://go-review.googlesource.com/c/go/+/428977
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
initialReqCancel := req.Cancel // the user's original Request.Cancel, if any
var cancelCtx func()
- if oldCtx := req.Context(); timeBeforeContextDeadline(deadline, oldCtx) {
+ if timeBeforeContextDeadline(deadline, oldCtx) {
req.ctx, cancelCtx = context.WithDeadline(oldCtx, deadline)
}