We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a410351 commit 4fc551dCopy full SHA for 4fc551d
1 file changed
src/StackExchange.Redis/KeyNotification.SubKeys.cs
@@ -195,7 +195,7 @@ public ref struct SubKeyEnumerator
195
private int _currentOffset;
196
private int _currentLength;
197
private bool _hasCurrent;
198
- private RedisValue _current;
+ private byte[]? _current;
199
200
internal SubKeyEnumerator(scoped KeyNotification notification)
201
{
@@ -283,11 +283,7 @@ public RedisValue Current
283
get
284
285
if (!_hasCurrent) return default;
286
- if (_current.IsNull)
287
- {
288
- _current = CurrentBytes.ToArray();
289
- }
290
- return _current;
+ return _current ??= CurrentBytes.ToArray();
291
}
292
293
0 commit comments