Fix warnings about "type 'K' cannot be used as type parameter 'TKey' in the generic type or method 'Dictionary<TKey, TValue>'"
Some checks are pending
Build and test / build (push) Waiting to run
Run Integration Tests / build (push) Waiting to run

This commit is contained in:
BobLd 2025-01-19 11:43:47 +00:00
parent c4576e4ffa
commit 24b9a99b8a
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
return code;
}
public static void PutAll<TKey, TValue>(this Dictionary<TKey, TValue> target, IReadOnlyDictionary<TKey, TValue> source)
public static void PutAll<TKey, TValue>(this Dictionary<TKey, TValue> target, IReadOnlyDictionary<TKey, TValue> source) where TKey : notnull
{
foreach (var pair in source)
{

View File

@ -5,7 +5,7 @@ namespace UglyToad.PdfPig.Util
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
internal class StackDictionary<K, V>
internal class StackDictionary<K, V> where K : notnull
{
private readonly List<Dictionary<K, V>> values = new List<Dictionary<K, V>>();