diff --git a/Tomlet/TomlSerializationMethods.cs b/Tomlet/TomlSerializationMethods.cs index cee4b8e..7262a21 100644 --- a/Tomlet/TomlSerializationMethods.cs +++ b/Tomlet/TomlSerializationMethods.cs @@ -371,14 +371,13 @@ private static Deserialize> StringKeyedDictionaryDeseriali }; } - // unmanaged + IConvertible is the closest I can get to expressing "primitives only" #if MODERN_DOTNET #if NET7_0_OR_GREATER [RequiresDynamicCode("The native code for underlying implementations of deserialize helper methods may not be available for a given type.")] #endif // NET7_0_OR_GREATER - private static Deserialize> PrimitiveKeyedDictionaryDeserializerFor(TomlSerializerOptions options) where TKey : unmanaged, IConvertible + private static Deserialize> PrimitiveKeyedDictionaryDeserializerFor(TomlSerializerOptions options) #else - private static Deserialize> PrimitiveKeyedDictionaryDeserializerFor(TomlSerializerOptions options) where TKey : unmanaged, IConvertible + private static Deserialize> PrimitiveKeyedDictionaryDeserializerFor(TomlSerializerOptions options) #endif { var valueDeserializer = GetDeserializer(typeof(TValue), options); @@ -539,4 +538,4 @@ private static void RegisterDictionaryDeserializer(Deserialize deserialize .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); }); } -} \ No newline at end of file +}