Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ public void AppendFormatted(char value, int alignment = 0, string? format = null

void AppendFormattedAlignment(char value, int alignment, string? format)
{
var bytesWritten = 0;
int bytesWritten;

// add left whitespace
if (alignment > 0)
Expand Down
4 changes: 2 additions & 2 deletions src/Utf8StringInterpolation/Utf8StringWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void AppendFormattedCore<T>(T value, int alignment = 0, string? format = null)
// no alignment or add right whitespace
if (alignment <= 0)
{
var bytesWritten = 0;
int bytesWritten;

#if NET8_0_OR_GREATER
if (typeof(T).IsEnum)
Expand Down Expand Up @@ -338,7 +338,7 @@ int AppendSpanFormattable<T>(T value, string? format)
Debug.Assert(value is ISpanFormattable);

Span<char> charDest = stackalloc char[256];
var charWritten = 0;
int charWritten;
while (!((ISpanFormattable)value).TryFormat(charDest, out charWritten, format, formatProvider))
{
if (charDest.Length < 512)
Expand Down