Skip to content

Commit

Permalink
fix un-used variables (#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Feb 16, 2024
1 parent c016baf commit 8549bbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Humanizer.Tests.Shared/NumberToWordsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void ToWords_WordFormIsIgnored(int number, string expected)
var abbrFrom3 = ((long)number).ToWords(WordForm.Abbreviation, default(GrammaticalGender));

Assert.All(
new[] { normalForm1, abbrForm1, normalForm2, abbrForm2, normalForm3, normalForm3 },
new[] { normalForm1, abbrForm1, normalForm2, abbrForm2, normalForm3, normalForm3, abbrFrom3 },
item => Assert.Equal(expected, item));
}

Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/MetricNumeralExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ private static bool IsInvalidMetricNumeral(this string input)
var index = input.Length - 1;
var last = input[index];
var isSymbol = Symbols[0].Contains(last) || Symbols[1].Contains(last);
return !double.TryParse(isSymbol ? input.Remove(index) : input, out var number);
return !double.TryParse(isSymbol ? input.Remove(index) : input, out _);
}

private struct UnitPrefix(string name, string shortScaleWord, string longScaleWord = null)
Expand Down

0 comments on commit 8549bbc

Please sign in to comment.