Skip to content

Commit 9f715eb

Browse files
committed
Fix lint issues
Signed-off-by: Alex Rehnby-Martin <alex.rehnby-martin@improving.com>
1 parent 7ec0b5f commit 9f715eb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sources/Valkey.Glide/Internals/Cmd.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,17 @@ public string[] GetArgs() => Request == RequestType.CustomCommand
8787
? ArgsArray.Args.ToStrings()
8888
: [.. GetCommandParts(Request).Concat(ArgsArray.Args.ToStrings())];
8989

90+
#pragma warning disable IDE0072 // Populate switch
9091
private static string[] GetCommandParts(RequestType requestType) => requestType switch
9192
{
9293
RequestType.ObjectEncoding => ["OBJECT", "ENCODING"],
9394
RequestType.ObjectFreq => ["OBJECT", "FREQ"],
9495
RequestType.ObjectIdleTime => ["OBJECT", "IDLETIME"],
9596
RequestType.ObjectRefCount => ["OBJECT", "REFCOUNT"],
97+
RequestType.Command_ => ["COMMAND"],
9698
_ => [requestType.ToString().ToUpper()]
9799
};
100+
#pragma warning restore IDE0072 // Populate switch
98101
}
99102

100103
internal record ArgsArray

sources/Valkey.Glide/Internals/Request.GenericCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public static Cmd<bool, bool> KeyMoveAsync(ValkeyKey key, int database)
330330
return new(RequestType.Scan, [.. args], false, arr =>
331331
{
332332
object[] scanArray = arr;
333-
long nextCursor = scanArray[0] is long l ? l : long.Parse(scanArray[0].ToString());
333+
long nextCursor = scanArray[0] is long l ? l : long.Parse(scanArray[0].ToString() ?? "0");
334334
ValkeyKey[] keys = [.. ((object[])scanArray[1]).Cast<GlideString>().Select(gs => new ValkeyKey(gs))];
335335
return (nextCursor, keys);
336336
});

0 commit comments

Comments
 (0)