Skip to content

Commit

Permalink
Merge pull request #376 from MehdiK/fix-IConvertible-warning
Browse files Browse the repository at this point in the history
Fixes the IConvertible warning thrown on Windows Phone reported on #317
  • Loading branch information
MehdiK committed Feb 3, 2015
2 parents 352b019 + f807583 commit aa144ba
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
###In Development
- [#376](https://github.com/MehdiK/Humanizer/pull/376): Fixes the IConvertible warning thrown on Windows Phone reported on #317

[Commits](https://github.com/MehdiK/Humanizer/compare/v1.33.0...master)

Expand Down
4 changes: 2 additions & 2 deletions src/Humanizer.Tests/DateHumanizeDefaultStrategyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void HoursFromNowNotTomorrow(int hours, string expected)
[Theory]
[InlineData(1, "yesterday")]
[InlineData(10, "10 days ago")]
[InlineData(28, "28 days ago")]
[InlineData(27, "27 days ago")]
[InlineData(32, "one month ago")]
public void DaysAgo(int days, string expected)
{
Expand All @@ -104,7 +104,7 @@ public void DaysAgo(int days, string expected)
[Theory]
[InlineData(1, "tomorrow")]
[InlineData(10, "10 days from now")]
[InlineData(28, "28 days from now")]
[InlineData(27, "27 days from now")]
[InlineData(32, "one month from now")]
public void DaysFromNow(int days, string expected)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer.Tests/DehumanizeToEnumTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void HonorsLocalizedDisplayAttribute()
Assert.Equal(EnumUnderTest.MemberWithLocalizedDisplayAttribute, EnumTestsResources.MemberWithLocalizedDisplayAttribute.DehumanizeTo(typeof(EnumUnderTest)));
}

struct DummyStructWithEnumInterfaces : IComparable, IFormattable, IConvertible
struct DummyStructWithEnumInterfaces : IComparable, IFormattable
{
public int CompareTo(object obj)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Humanizer/EnumDehumanizeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class EnumDehumanizeExtensions
/// <exception cref="NoMatchFoundException">Couldn't find any enum member that matches the string</exception>
/// <returns></returns>
public static TTargetEnum DehumanizeTo<TTargetEnum>(this string input)
where TTargetEnum : struct, IComparable, IFormattable, IConvertible
where TTargetEnum : struct, IComparable, IFormattable
{
return (TTargetEnum)DehumanizeToPrivate(input, typeof(TTargetEnum), OnNoMatch.ThrowsException);
}
Expand Down

0 comments on commit aa144ba

Please sign in to comment.