Skip to content

Commit 6775444

Browse files
authored
Fixed naming of local constants (#8396)
1 parent 3a5dbc6 commit 6775444

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/GreenDonut/src/GreenDonut.Data/Cursors/CursorParser.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,18 @@ static bool CanParse(byte code, int pos, ReadOnlySpan<byte> buffer)
111111

112112
private static CursorPageInfo ParsePageInfo(ref Span<byte> span)
113113
{
114-
const byte Open = (byte)'{';
115-
const byte Close = (byte)'}';
116-
const byte Separator = (byte)'|';
114+
const byte open = (byte)'{';
115+
const byte close = (byte)'}';
116+
const byte separator = (byte)'|';
117117

118118
// Validate input: must start with `{` and end with `}`
119-
if (span.Length < 2 || span[0] != Open)
119+
if (span.Length < 2 || span[0] != open)
120120
{
121121
return default;
122122
}
123123

124124
// the page info is empty
125-
if (span[0] == Open && span[1] == Close)
125+
if (span[0] == open && span[1] == close)
126126
{
127127
span = span[2..];
128128
return default;
@@ -131,17 +131,17 @@ private static CursorPageInfo ParsePageInfo(ref Span<byte> span)
131131
// Advance span beyond opening `{`
132132
span = span[1..];
133133

134-
var separatorIndex = ExpectSeparator(span, Separator);
134+
var separatorIndex = ExpectSeparator(span, separator);
135135
var part = span[..separatorIndex];
136136
ParseNumber(part, out var offset, out var consumed);
137137
var start = separatorIndex + 1;
138138

139-
separatorIndex = ExpectSeparator(span[start..], Separator);
139+
separatorIndex = ExpectSeparator(span[start..], separator);
140140
part = span.Slice(start, separatorIndex);
141141
ParseNumber(part, out var page, out consumed);
142142
start += separatorIndex + 1;
143143

144-
separatorIndex = ExpectSeparator(span[start..], Close);
144+
separatorIndex = ExpectSeparator(span[start..], close);
145145
part = span.Slice(start, separatorIndex);
146146
ParseNumber(part, out var totalCount, out consumed);
147147
start += separatorIndex + 1;

0 commit comments

Comments
 (0)