Skip to content

Commit

Permalink
Merge pull request #76 from SimonCropp/remove-double-type-check
Browse files Browse the repository at this point in the history
remove double type check
  • Loading branch information
omar authored Sep 26, 2024
2 parents a5e2774 + 5ffb2da commit 17fce5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ByteSizeLib/ByteSize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ public override bool Equals(object? value)
return false;

ByteSize other;
if (value is ByteSize)
other = (ByteSize)value;
if (value is ByteSize size)
other = size;
else
return false;

Expand Down

0 comments on commit 17fce5a

Please sign in to comment.