-
Notifications
You must be signed in to change notification settings - Fork 37
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
🎁 Populate nwritten_out when errors occur in config-store::get or dictionary::get #389
Conversation
e67f30f
to
cec5670
Compare
cec5670
to
305bb3d
Compare
fastly_config_store#get
to always return the buffer lengthThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I'm pretty new to reading Rust code, so if you want another reviewer, please pull someone in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and matches the pending witx changes of the platform.
…tionary::get (fastly#389) The wiggle representation of a function that returns Result<u32, FastlyStatus> and one that takes a u32 outparam as its last argument and returns Result<(), FastlyStatus> are the same, which means that we can support communicating the length needed to resolve a FastlyStatus::BufferLen error without changing the abi of fastly_config_store::get or fastly_dictionary::get. This PR makes this change to both fastly_config_store::get and fastly_dictionary::get, allowing SDKs to better adapt when buffer-length errors occur.
The wiggle representation of a function that returns
Result<u32, FastlyStatus>
and one that takes au32
outparam as its last argument and returnsResult<(), FastlyStatus>
are the same, which means that we can support communicating the length needed to resolve aFastlyStatus::BufferLen
error without changing the abi offastly_config_store::get
orfastly_dictionary::get
.This PR makes this change to both
fastly_config_store::get
andfastly_dictionary::get
, allowing SDKs to better adapt when buffer-length errors occur.