Skip to content
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

Rust msgpacked value #146

Merged
merged 4 commits into from Apr 17, 2020

Conversation

narekgharibyan
Copy link
Member

added functionality to get internal msgpacked on rust end

@coveralls
Copy link

coveralls commented Apr 16, 2020

Coverage Status

Coverage remained the same at 96.031% when pulling ee0f081 on narekgharibyan:rust_msgpacked_value into da61bf1 on KeyviDev:master.


const size_t data_size = msgpacked_value.size();
auto data_ptr = malloc(data_size);
memcpy(data_ptr, msgpacked_value.c_str(), data_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am missing some checks:

  • what if msgpacked_value has size 0 (key-only dictionary, empty match)
  • malloc could return NULL on error

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hendrikmuhs thx!
addressed them here ee0f081

Copy link
Contributor

@hendrikmuhs hendrikmuhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@narekgharibyan narekgharibyan merged commit cefd513 into KeyviDev:master Apr 17, 2020
@narekgharibyan narekgharibyan deleted the rust_msgpacked_value branch April 17, 2020 10:12
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.

None yet

3 participants