Skip to content

Commit 1d4848e

Browse files
authored
Merge pull request #29 from draconware-dev/dev
v2.0.1
2 parents 1d3cb1e + 802e7c4 commit 1d4848e

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

Changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) from v2.0 onwards.
77

8+
## [2.0.1] - 2025-9-28
9+
10+
### Fixed
11+
12+
- a bug in Min() in .net7.0.
13+
814
## [2.0.0] - 2025-9-28
915

1016
### Fixed
@@ -34,7 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3440

3541
- incorrect ranges returned by the range-based Split method for versions prior to .Net 9.
3642

37-
### Changed
43+
### Changed
3844

3945
- moved MemoryExtensions containing range-based Split method for versions prior to .Net 9 from `System` to `SpanExtensions`.
4046
- grammatical issues in some documentation comments.

src/Extensions/ReadOnlySpan/Linq/Min.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public static T Min<T>(this ReadOnlySpan<T> source) where T : IComparable<T>
177177
{
178178
T current = source[i];
179179

180-
if(current.CompareTo(min) > 0)
180+
if(current.CompareTo(min) < 0)
181181
{
182182
min = current;
183183
}
@@ -292,7 +292,7 @@ public static byte Min(this ReadOnlySpan<byte> source)
292292
{
293293
byte current = source[i];
294294

295-
if(current.CompareTo(min) > 0)
295+
if(current.CompareTo(min) < 0)
296296
{
297297
min = current;
298298
}
@@ -407,7 +407,7 @@ public static ushort Min(this ReadOnlySpan<ushort> source)
407407
{
408408
ushort current = source[i];
409409

410-
if(current.CompareTo(min) > 0)
410+
if(current.CompareTo(min) < 0)
411411
{
412412
min = current;
413413
}
@@ -522,7 +522,7 @@ public static uint Min(this ReadOnlySpan<uint> source)
522522
{
523523
uint current = source[i];
524524

525-
if(current.CompareTo(min) > 0)
525+
if(current.CompareTo(min) < 0)
526526
{
527527
min = current;
528528
}
@@ -606,7 +606,7 @@ public static ulong Min(this ReadOnlySpan<ulong> source)
606606
{
607607
ulong current = source[i];
608608

609-
if(current.CompareTo(min) > 0)
609+
if(current.CompareTo(min) < 0)
610610
{
611611
min = current;
612612
}
@@ -721,7 +721,7 @@ public static sbyte Min(this ReadOnlySpan<sbyte> source)
721721
{
722722
sbyte current = source[i];
723723

724-
if(current.CompareTo(min) > 0)
724+
if(current.CompareTo(min) < 0)
725725
{
726726
min = current;
727727
}
@@ -836,7 +836,7 @@ public static short Min(this ReadOnlySpan<short> source)
836836
{
837837
short current = source[i];
838838

839-
if(current.CompareTo(min) > 0)
839+
if(current.CompareTo(min) < 0)
840840
{
841841
min = current;
842842
}
@@ -951,7 +951,7 @@ public static int Min(this ReadOnlySpan<int> source)
951951
{
952952
int current = source[i];
953953

954-
if(current.CompareTo(min) > 0)
954+
if(current.CompareTo(min) < 0)
955955
{
956956
min = current;
957957
}
@@ -1035,7 +1035,7 @@ public static long Min(this ReadOnlySpan<long> source)
10351035
{
10361036
long current = source[i];
10371037

1038-
if(current.CompareTo(min) > 0)
1038+
if(current.CompareTo(min) < 0)
10391039
{
10401040
min = current;
10411041
}
@@ -1150,7 +1150,7 @@ public static float Min(this ReadOnlySpan<float> source)
11501150
{
11511151
float current = source[i];
11521152

1153-
if(current.CompareTo(min) > 0)
1153+
if(current.CompareTo(min) < 0)
11541154
{
11551155
min = current;
11561156
}
@@ -1234,7 +1234,7 @@ public static double Min(this ReadOnlySpan<double> source)
12341234
{
12351235
double current = source[i];
12361236

1237-
if(current.CompareTo(min) > 0)
1237+
if(current.CompareTo(min) < 0)
12381238
{
12391239
min = current;
12401240
}

src/SpanExtensions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageTags>Span;Performance;Extension;String</PackageTags>
2121
<PackageReleaseNotes>https://github.com/draconware-dev/SpanExtensions.Net/blob/main/Changelog.md</PackageReleaseNotes>
2222
<PackageLicenseFile>LICENSE</PackageLicenseFile>
23-
<Version>2.0.0</Version>
23+
<Version>2.0.1</Version>
2424
<PackageId>SpanExtensions.Net</PackageId>
2525
<PackageReadmeFile>README.md</PackageReadmeFile>
2626
<PackageIcon>icon.png</PackageIcon>

0 commit comments

Comments
 (0)