Skip to content

Commit b83ddbe

Browse files
committed
Apply CoPilot suggestion of simplifying code
1 parent 437108d commit b83ddbe

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/libraries/Microsoft.Extensions.Logging.Abstractions/src/FormattedLogValues.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,11 @@ public FormattedLogValues(string? format, params object?[]? values)
7070
{
7171
return new KeyValuePair<string, object?>("{OriginalFormat}", _originalMessage);
7272
}
73-
else
74-
{
75-
throw new IndexOutOfRangeException();
76-
}
77-
}
78-
else
79-
{
80-
return _formatter.GetValue(_values, index);
73+
74+
throw new IndexOutOfRangeException();
8175
}
76+
77+
return _formatter.GetValue(_values, index);
8278
}
8379
}
8480

0 commit comments

Comments
 (0)