Skip to content

Commit 4fc551d

Browse files
committed
cleanup
1 parent a410351 commit 4fc551d

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/StackExchange.Redis/KeyNotification.SubKeys.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public ref struct SubKeyEnumerator
195195
private int _currentOffset;
196196
private int _currentLength;
197197
private bool _hasCurrent;
198-
private RedisValue _current;
198+
private byte[]? _current;
199199

200200
internal SubKeyEnumerator(scoped KeyNotification notification)
201201
{
@@ -283,11 +283,7 @@ public RedisValue Current
283283
get
284284
{
285285
if (!_hasCurrent) return default;
286-
if (_current.IsNull)
287-
{
288-
_current = CurrentBytes.ToArray();
289-
}
290-
return _current;
286+
return _current ??= CurrentBytes.ToArray();
291287
}
292288
}
293289

0 commit comments

Comments
 (0)