vendor/golang.org/x/net/context/go17.go
changeset 262 8d3354485fc3
parent 260 445e01aede7e
--- a/vendor/golang.org/x/net/context/go17.go	Thu Sep 22 16:32:45 2022 +0200
+++ b/vendor/golang.org/x/net/context/go17.go	Thu Sep 22 16:33:34 2022 +0200
@@ -32,7 +32,7 @@
 // call cancel as soon as the operations running in this Context complete.
 func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
 	ctx, f := context.WithCancel(parent)
-	return ctx, CancelFunc(f)
+	return ctx, f
 }
 
 // WithDeadline returns a copy of the parent context with the deadline adjusted
@@ -46,7 +46,7 @@
 // call cancel as soon as the operations running in this Context complete.
 func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) {
 	ctx, f := context.WithDeadline(parent, deadline)
-	return ctx, CancelFunc(f)
+	return ctx, f
 }
 
 // WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).