Skip to content

Commit f1b0684

Browse files
Revert "Allow PdqHash to Target .NET 9 & 10."
This reverts commit e8c5011.
1 parent e8c5011 commit f1b0684

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

src/PdqHash/Extensions/CachedAsyncEnumerable.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,4 @@ public class CachedAsyncEnumerable<T>(IAsyncEnumerable<T> asyncEnumerable) : IAs
99

1010
public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = default) =>
1111
new CachedAsyncEnumerator<T>(_materialized, _asyncEnumerator);
12-
13-
/// <summary>
14-
/// Returns the number of elements that have been materialized so far.
15-
/// This is only accurate after the enumerable has been fully consumed.
16-
/// </summary>
17-
public int Count => _materialized.Count;
1812
}

src/PdqHash/PdqHash.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<PackageLicenseFile>LICENSE</PackageLicenseFile>
77
<PackageReadmeFile>README.md</PackageReadmeFile>
88

9-
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
9+
<TargetFramework>net10.0</TargetFramework>
1010
<ImplicitUsings>enable</ImplicitUsings>
1111
<Nullable>enable</Nullable>
1212
<PublishRepositoryUrl>true</PublishRepositoryUrl>

src/PdqHash/PdqHash256.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public string dumpBitsAcross()
297297

298298
public string dumpWords()
299299
{
300-
return string.Join(",", Enumerable.Reverse(w).Select(w => w.ToString(CultureInfo.InvariantCulture)));
300+
return string.Join(",", w.Reverse().Select(w => w.ToString(CultureInfo.InvariantCulture)));
301301
}
302302

303303
public int[] Words() => w.ToArray();

src/PdqHash/Video/VPdqComparer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public static bool CalculateMatch(IReadOnlySet<VPdqHash> left, IReadOnlySet<VPdq
9797
}
9898
}
9999

100-
var leftMatchPercent = leftFramesMatched * 100 / l.Count;
101-
var rightMatchPercent = rightFramesMatched * 100 / r.Count;
100+
var leftMatchPercent = leftFramesMatched * 100 / await l.CountAsync();
101+
var rightMatchPercent = rightFramesMatched * 100 / await r.CountAsync();
102102

103103
return (leftMatchPercent > matchThreshold || rightMatchPercent > matchThreshold, leftMatchPercent, rightMatchPercent);
104104
}

0 commit comments

Comments
 (0)