Skip to content

Commit

Permalink
turning off IDE0047
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeyertons committed Oct 16, 2023
1 parent 72dafec commit c91a5a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ dotnet_naming_style.static_prefix_style.capitalization = pascal_case
# don't have var preferences
dotnet_diagnostic.IDE0007.severity = none
dotnet_diagnostic.IDE0008.severity = none

# IDE0047: Remove unnecessary parentheses
dotnet_diagnostic.IDE0047.severity = none
2 changes: 1 addition & 1 deletion src/Polly.Core/Retry/RetryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private static TimeSpan DecorrelatedJitterBackoffV2(int attempt, TimeSpan baseDe

private static TimeSpan ApplyJitter(TimeSpan delay, Func<double> randomizer)
{
var offset = delay.TotalMilliseconds * JitterFactor / 2;
var offset = (delay.TotalMilliseconds * JitterFactor) / 2;
var randomDelay = (delay.TotalMilliseconds * JitterFactor * randomizer()) - offset;
var newDelay = delay.TotalMilliseconds + randomDelay;

Expand Down

0 comments on commit c91a5a3

Please sign in to comment.