-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with a simple GET command #1227
Comments
Cast to Option<Vec<u8>> instead of Vec. A missing key isn't an error.
…On Wed, 19 Jun 2024, 2:49 PaulDotSH, ***@***.***> wrote:
Hi, the following coding snippet
if let Ok(encoded) = redis::cmd("GET")
.arg(&encoded_filter)
.query_async::<_, Vec<u8>>(&mut conn)
.await {}
ALWAYS returns Ok, even when the key is NOT present in redis, it just
choses to return an empty vec. Why does this happen? How can I fix it?
—
Reply to this email directly, view it on GitHub
<#1227>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDEBBTDWIHDEJZRX2MQJJLZIDBQJAVCNFSM6AAAAABJQ7CGDGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DAOJSGY2DGNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@PaulDotSH is the issue solved? |
Fixed by the comment from @nihohit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, the following coding snippet
ALWAYS returns Ok, even when the key is NOT present in redis, it just choses to return an empty vec. Why does this happen? How can I fix it?
The text was updated successfully, but these errors were encountered: