Skip to content

Commit

Permalink
Fix nullability warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Feb 1, 2024
1 parent bb6cfa8 commit 97f7877
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tomlyn/Model/ModelToTomlTransform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void WriteKey(string name)
private string EscapeKey(string name)
{
if (string.IsNullOrWhiteSpace(name)) return $"\"{name.EscapeForToml()}\"";

// A-Za-z0-9_-
foreach (var c in name)
{
Expand Down Expand Up @@ -200,8 +200,8 @@ private bool VisitObject(ObjectDynamicAccessor accessor, object currentObject, b
}

// Sort primitive first
properties = properties.OrderBy(_ => _,
Comparer<KeyValuePair<string,object>>.Create((left, right) =>
properties = properties.OrderBy(p => p,
Comparer<KeyValuePair<string,object?>>.Create((left, right) =>
{
var leftValue = left.Value;
var rightValue = right.Value;
Expand Down

0 comments on commit 97f7877

Please sign in to comment.