Skip to content

Commit

Permalink
twitch: Remove Args parameter from retryDelegate
Browse files Browse the repository at this point in the history
It's a good idea but it doesn't work with older compilers.
  • Loading branch information
zorael committed Dec 15, 2023
1 parent a94d34b commit cb64bb9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source/kameloso/plugins/twitch/api.d
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ struct QueryResponse
dg = Delegate to call.
async = Whether or not the delegate should be called asynchronously,
scheduling attempts using [kameloso.plugins.common.delayawait.delay|delay].
args = Arguments to pass to the delegate.
Returns:
Whatever the passed delegate returns.
Expand All @@ -88,11 +87,10 @@ struct QueryResponse
[InvalidCredentialsException] likewise.
[Exception] if the delegate throws it and `endlessly` is not passed.
+/
auto retryDelegate(Flag!"endlessly" endlessly = No.endlessly, uint delayMsecs = 4000, Dg, Args...)
auto retryDelegate(Flag!"endlessly" endlessly = No.endlessly, uint delayMsecs = 4000, Dg)
(TwitchPlugin plugin,
Dg dg,
const Flag!"async" async = Yes.async,
Args args)
const Flag!"async" async = Yes.async)
in ((!async || Fiber.getThis), "Tried to call async `retryDelegate` from outside a Fiber")
{
static if (endlessly)
Expand Down Expand Up @@ -124,7 +122,7 @@ in ((!async || Fiber.getThis), "Tried to call async `retryDelegate` from outside
Thread.sleep(retryDelay);
}
}
return dg(args);
return dg();
}
catch (MissingBroadcasterTokenException e)
{
Expand Down

0 comments on commit cb64bb9

Please sign in to comment.