8000 Extend the "bulk values" pattern to Option by SimonSapin · Pull Request #349 · aembke/fred.rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Extend the "bulk values" pattern to Option #349

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SimonSapin
Copy link

Value::Array([Value::Null]) now converts to None instead of error.

In the already-documented example of MGET, each item of the array may or may not be Null/nil depending on whether the requested key exists. When the array is known to be of length 1 (because only one argument was used) it can be convenient to convert to a single Option

`Value::Array([Value::Null])` now converts to `None` instead of error.

In the already-documented example of `MGET`, each item of the array
may or may not be `Null`/`nil` depending on whether the requested key exists.
When the array is known to be of length 1 (because only one argument was used)
it can be convenient to convert to a single `Option`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0