Skip to content

Commit 52b02b9

Browse files
authored
remove unnecessary impl overloads (#539)
1 parent 72f560f commit 52b02b9

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

chronos/internal/asyncfutures.nim

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,11 @@ template Finished*(T: type FutureState): FutureState {.
7676
deprecated: "Use FutureState.Completed instead".} =
7777
FutureState.Completed
7878

79-
proc newFutureImpl[T](loc: ptr SrcLoc): Future[T] =
80-
let fut = Future[T]()
81-
internalInitFutureBase(fut, loc, FutureState.Pending, {})
82-
fut
83-
8479
proc newFutureImpl[T](loc: ptr SrcLoc, flags: FutureFlags): Future[T] =
8580
let fut = Future[T]()
8681
internalInitFutureBase(fut, loc, FutureState.Pending, flags)
8782
fut
8883
89-
proc newInternalRaisesFutureImpl[T, E](
90-
loc: ptr SrcLoc): InternalRaisesFuture[T, E] =
91-
let fut = InternalRaisesFuture[T, E]()
92-
internalInitFutureBase(fut, loc, FutureState.Pending, {})
93-
fut
94-
9584
proc newInternalRaisesFutureImpl[T, E](
9685
loc: ptr SrcLoc, flags: FutureFlags): InternalRaisesFuture[T, E] =
9786
let fut = InternalRaisesFuture[T, E]()
@@ -125,7 +114,7 @@ template newInternalRaisesFuture*[T, E](fromProc: static[string] = ""): auto =
125114
##
126115
## Specifying ``fromProc``, which is a string specifying the name of the proc
127116
## that this future belongs to, is a good habit as it helps with debugging.
128-
newInternalRaisesFutureImpl[T, E](getSrcLocation(fromProc))
117+
newInternalRaisesFutureImpl[T, E](getSrcLocation(fromProc), {})
129118
130119
template newFutureSeq*[A, B](fromProc: static[string] = ""): FutureSeq[A, B] {.deprecated.} =
131120
## Create a new future which can hold/preserve GC sequence until future will
@@ -1697,7 +1686,7 @@ proc wait*[T](fut: Future[T], deadline: SomeFuture): Future[T] =
16971686
# We set `OwnCancelSchedule` flag, because we going to cancel `retFuture`
16981687
# manually at proper time.
16991688
waitUntilImpl(fut, retFuture, deadline)
1700-
1689+
17011690
proc join*(future: FutureBase): Future[void] {.
17021691
async: (raw: true, raises: [CancelledError]).} =
17031692
## Returns a future which will complete once future ``future`` completes.

0 commit comments

Comments
 (0)