diff --git a/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapUtils.cs b/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapUtils.cs index d5c0fd6fc..26e1dbad5 100644 --- a/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapUtils.cs +++ b/src/UglyToad.PdfPig/PdfFonts/Cmap/CMapUtils.cs @@ -16,7 +16,7 @@ public static int ToInt(this ReadOnlySpan data) return code; } - public static void PutAll(this Dictionary target, IReadOnlyDictionary source) + public static void PutAll(this Dictionary target, IReadOnlyDictionary source) where TKey : notnull { foreach (var pair in source) { diff --git a/src/UglyToad.PdfPig/Util/StackDictionary.cs b/src/UglyToad.PdfPig/Util/StackDictionary.cs index 4b91e06ce..4b521439b 100644 --- a/src/UglyToad.PdfPig/Util/StackDictionary.cs +++ b/src/UglyToad.PdfPig/Util/StackDictionary.cs @@ -5,7 +5,7 @@ namespace UglyToad.PdfPig.Util using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - internal class StackDictionary + internal class StackDictionary where K : notnull { private readonly List> values = new List>();