Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #238 from microsoft/baywet-patch-1
Browse files Browse the repository at this point in the history
fix: removes unused variable
  • Loading branch information
baywet authored Jun 25, 2024
2 parents d0454da + 8b8393d commit c9c3fe2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/JsonParseNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ public JsonParseNode(JsonElement node, KiotaJsonSerializationContext jsonSeriali
{
var rawValue = _jsonNode.GetString();
if(string.IsNullOrEmpty(rawValue)) return null;

var type = typeof(T);

rawValue = ToEnumRawName<T>(rawValue!);
if (typeof(T).IsDefined(typeof(FlagsAttribute)))
{
Expand All @@ -240,7 +239,7 @@ public JsonParseNode(JsonElement node, KiotaJsonSerializationContext jsonSeriali
return (T)(object)value;
}
else
return Enum.TryParse<T>(rawValue, true,out var result) ? result : null;
return Enum.TryParse<T>(rawValue, true, out var result) ? result : null;
}

/// <summary>
Expand Down

0 comments on commit c9c3fe2

Please sign in to comment.