File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Main/src/Ranges/[Boundaries] Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -517,17 +517,16 @@ public int CompareTo(T other) =>
517
517
[ Pure ]
518
518
int IComparable . CompareTo ( object obj )
519
519
{
520
- // ReSharper disable once UsePatternMatching
521
- var otherA = obj as RangeBoundaryFrom < T > ? ;
522
- if ( otherA != null )
520
+ // ReSharper disable once MergeCastWithTypeCheck
521
+ if ( obj is RangeBoundaryFrom < T > )
523
522
{
524
- return CompareTo ( otherA . GetValueOrDefault ( ) ) ;
523
+ return CompareTo ( ( RangeBoundaryFrom < T > ) obj ) ;
525
524
}
526
- // ReSharper disable once UsePatternMatching
527
- var otherB = obj as RangeBoundaryTo < T > ? ;
528
- if ( otherB != null )
525
+
526
+ // ReSharper disable once MergeCastWithTypeCheck
527
+ if ( obj is RangeBoundaryTo < T > )
529
528
{
530
- return CompareTo ( otherB . GetValueOrDefault ( ) ) ;
529
+ return CompareTo ( ( RangeBoundaryTo < T > ) obj ) ;
531
530
}
532
531
533
532
return CompareTo ( ( T ) obj ) ;
You can’t perform that action at this time.
0 commit comments