Skip to content

Commit

Permalink
Merge pull request #78 from codatio/fix-failing-test-build
Browse files Browse the repository at this point in the history
Add extra type constraint in test helpers
  • Loading branch information
aevv authored Nov 18, 2024
2 parents e411a33 + 5ce0ba7 commit d3f45a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tests/Helpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let createSimpleDeployment parameters =

let convertTo<'T> = Serialization.toJson >> Serialization.ofJson<'T>

let farmerToMs<'T when 'T: null> (serializationSettings: Newtonsoft.Json.JsonSerializerSettings) data =
let farmerToMs<'T when 'T: null and 'T: not struct> (serializationSettings: Newtonsoft.Json.JsonSerializerSettings) data =
data
|> Serialization.toJson
|> fun json -> SafeJsonConvert.DeserializeObject<'T>(json, serializationSettings)
Expand Down

0 comments on commit d3f45a2

Please sign in to comment.